Skip to content

Commit

Permalink
Add test data for #322
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Apr 21, 2023
1 parent 887750d commit e8c0533
Show file tree
Hide file tree
Showing 8 changed files with 1,827 additions and 3 deletions.
4 changes: 1 addition & 3 deletions tests/Builder/UpdateStatementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ public function testBuilder(): void
$stmt->build()
);
/* Assertion 2 */
$parser = new Parser(
'update user u join user_detail ud on u.id = ud.user_id set ud.ip =\'33\' where u.id = 1'
);
$parser = new Parser('update user u join user_detail ud on u.id = ud.user_id set ud.ip =\'33\' where u.id = 1');
$stmt = $parser->statements[0];
$this->assertEquals(
'UPDATE user AS `u` SET ud.ip = \'33\' WHERE u.id = 1',
Expand Down
3 changes: 3 additions & 0 deletions tests/Parser/TransactionStatementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public function transactionProvider(): array
['parser/parseTransaction2'],
['parser/parseTransaction3'],
['parser/parseTransaction4'],
['parser/parseTransaction5'],
['parser/parseTransaction6'],
['parser/parseTransaction7'],
['parser/parseTransactionErr1'],
];
}
Expand Down
6 changes: 6 additions & 0 deletions tests/data/parser/parseTransaction5.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BEGIN;
INSERT INTO t2 VALUES (3);
SAVEPOINT my_savepoint;
INSERT INTO t2 VALUES (4);
RELEASE SAVEPOINT my_savepoint;
COMMIT;
Loading

0 comments on commit e8c0533

Please sign in to comment.