Skip to content

Commit 26cf20e

Browse files
committed
Adding more tests to test the expression component
Signed-off-by: iifawzi <iifawzie@gmail.com>
1 parent aea568f commit 26cf20e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Builder/SelectStatementTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ public function testBuilder(): void
2222
. 'ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)',
2323
$stmt->build()
2424
);
25+
26+
$parser = new Parser('SELECT NULL IS NULL');
27+
$stmt = $parser->statements[0];
28+
29+
$this->assertEquals('SELECT NULL IS NULL', $stmt->build());
30+
31+
$parser = new Parser('SELECT NOT 1');
32+
$stmt = $parser->statements[0];
33+
34+
$this->assertEquals('SELECT NOT 1', $stmt->build());
35+
36+
$parser = new Parser('SELECT 1 BETWEEN 0 AND 2');
37+
$stmt = $parser->statements[0];
38+
39+
$this->assertEquals('SELECT 1 BETWEEN 0 AND 2', $stmt->build());
2540
}
2641

2742
public function testBuilderUnion(): void

0 commit comments

Comments
 (0)