File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ abstract class Operator
1414 public const IS_NOT = 'is not ' ;
1515 public const LIKE = 'like ' ;
1616 public const CONTAINS = 'contains ' ;
17+ public const NOT_LIKE = 'not like ' ;
18+ public const NOT_CONTAINS = 'not contains ' ;
1719 public const STARTS_WITH = 'starts with ' ;
1820 public const ENDS_WITH = 'ends with ' ;
1921}
Original file line number Diff line number Diff line change @@ -75,9 +75,9 @@ public function testBuildQuery()
7575 */
7676 public function testToString ()
7777 {
78- $ left = new Condition ('city ' , Operator::EQ , 'Bergamo ' );
78+ $ left = new Condition ('city ' , Operator::NOT_CONTAINS , 'Bergamo ' );
7979 $ right = new Condition ('age ' , Operator::LT , 30 );
8080 $ disjunction = new Disjunction ($ left , $ right );
81- $ this ->assertEquals ("(city = 'Bergamo' or age < 30) " , (string )$ disjunction );
81+ $ this ->assertEquals ("(city not contains 'Bergamo' or age < 30) " , (string )$ disjunction );
8282 }
8383}
You can’t perform that action at this time.
0 commit comments