| @@ 36-68 (lines=33) @@ | ||
| 33 | $this->assertEquals(42, $expr->getValue()->getValue()); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function provideComparator() |
|
| 37 | { |
|
| 38 | return [ |
|
| 39 | [ |
|
| 40 | 'eq', |
|
| 41 | '=', |
|
| 42 | ], |
|
| 43 | [ |
|
| 44 | 'neq', |
|
| 45 | '<>', |
|
| 46 | ], |
|
| 47 | [ |
|
| 48 | 'gt', |
|
| 49 | '>', |
|
| 50 | ], |
|
| 51 | [ |
|
| 52 | 'gte', |
|
| 53 | '>=', |
|
| 54 | ], |
|
| 55 | [ |
|
| 56 | 'lte', |
|
| 57 | '<=', |
|
| 58 | ], |
|
| 59 | [ |
|
| 60 | 'lt', |
|
| 61 | '<', |
|
| 62 | ], |
|
| 63 | [ |
|
| 64 | 'contains', |
|
| 65 | 'CONTAINS', |
|
| 66 | ], |
|
| 67 | ]; |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * It should throw an exception on unsupported comparators. |
|
| @@ 44-76 (lines=33) @@ | ||
| 41 | $this->assertEquals($expectedOperator, $children[0]->getOperator()); |
|
| 42 | } |
|
| 43 | ||
| 44 | public function provideComparator() |
|
| 45 | { |
|
| 46 | return [ |
|
| 47 | [ |
|
| 48 | 'eq', |
|
| 49 | 'jcr.operator.equal.to', |
|
| 50 | ], |
|
| 51 | [ |
|
| 52 | 'neq', |
|
| 53 | 'jcr.operator.not.equal.to', |
|
| 54 | ], |
|
| 55 | [ |
|
| 56 | 'gt', |
|
| 57 | 'jcr.operator.greater.than', |
|
| 58 | ], |
|
| 59 | [ |
|
| 60 | 'gte', |
|
| 61 | 'jcr.operator.greater.than.or.equal.to', |
|
| 62 | ], |
|
| 63 | [ |
|
| 64 | 'lte', |
|
| 65 | 'jcr.operator.less.than.or.equal.to', |
|
| 66 | ], |
|
| 67 | [ |
|
| 68 | 'lt', |
|
| 69 | 'jcr.operator.less.than', |
|
| 70 | ], |
|
| 71 | [ |
|
| 72 | 'contains', |
|
| 73 | 'jcr.operator.like', |
|
| 74 | ], |
|
| 75 | ]; |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * It should visit complex comparators. |
|