Skip to content

Commit

Permalink
Adding more tests to test the expression component
Browse files Browse the repository at this point in the history
Signed-off-by: iifawzi <iifawzie@gmail.com>
  • Loading branch information
iifawzi committed Dec 13, 2022
1 parent aea568f commit 26cf20e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Builder/SelectStatementTest.php
Expand Up @@ -22,6 +22,21 @@ public function testBuilder(): void
. 'ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)',
$stmt->build()
);

$parser = new Parser('SELECT NULL IS NULL');
$stmt = $parser->statements[0];

$this->assertEquals('SELECT NULL IS NULL', $stmt->build());

$parser = new Parser('SELECT NOT 1');
$stmt = $parser->statements[0];

$this->assertEquals('SELECT NOT 1', $stmt->build());

$parser = new Parser('SELECT 1 BETWEEN 0 AND 2');
$stmt = $parser->statements[0];

$this->assertEquals('SELECT 1 BETWEEN 0 AND 2', $stmt->build());
}

public function testBuilderUnion(): void
Expand Down

0 comments on commit 26cf20e

Please sign in to comment.