@@ 1086-1097 (lines=12) @@ | ||
1083 | * @dataProvider findProvider |
|
1084 | * @depends testCreateTestContent |
|
1085 | */ |
|
1086 | public function testFindNotLikeOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) |
|
1087 | { |
|
1088 | if ($this->supportsLikeWildcard($valueOne)) { |
|
1089 | $valueOne = substr_replace($valueOne, '*', -1, 1); |
|
1090 | } |
|
1091 | ||
1092 | $criteria = new LogicalNot( |
|
1093 | new Field('data', Operator::LIKE, $valueOne) |
|
1094 | ); |
|
1095 | ||
1096 | $this->assertFindResult($context, $criteria, false, true, $filter, $content, $modifyField); |
|
1097 | } |
|
1098 | ||
1099 | /** |
|
1100 | * Tests search with LIKE operator, with wildcard at the start (on strings). |
|
@@ 1132-1143 (lines=12) @@ | ||
1129 | * @dataProvider findProvider |
|
1130 | * @depends testCreateTestContent |
|
1131 | */ |
|
1132 | public function testFindNotLikeTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) |
|
1133 | { |
|
1134 | if ($this->supportsLikeWildcard($valueTwo)) { |
|
1135 | $valueTwo = substr_replace($valueTwo, '*', 2, 1); |
|
1136 | } |
|
1137 | ||
1138 | $criteria = new LogicalNot( |
|
1139 | new Field('data', Operator::LIKE, $valueTwo) |
|
1140 | ); |
|
1141 | ||
1142 | $this->assertFindResult($context, $criteria, true, false, $filter, $content, $modifyField); |
|
1143 | } |
|
1144 | ||
1145 | /** |
|
1146 | * Sets given custom field $fieldName on a Field criteria. |