Skip to content

Commit 7252aca

Browse files
committed
Add unit test
Signed-off-by: Kamil Tekiela <[email protected]>
1 parent af85abd commit 7252aca

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Components/ConditionTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,16 @@ public function testParseBetween(): void
2626
$this->assertEquals($component[1]->expr, 'OR');
2727
$this->assertEquals($component[2]->expr, '(id BETWEEN 30 AND 40)');
2828
}
29+
30+
public function testParseAnd(): void
31+
{
32+
$component = Condition::parse(
33+
new Parser(),
34+
$this->getTokensList("`col` LIKE 'AND'")
35+
);
36+
$this->assertEquals(
37+
"`col` LIKE 'AND'",
38+
Condition::build($component)
39+
);
40+
}
2941
}

0 commit comments

Comments
 (0)