@@ 294-325 (lines=32) @@ | ||
291 | * |
|
292 | * @return \eZ\Publish\API\Repository\Repository |
|
293 | */ |
|
294 | public function testCreateTestContent() |
|
295 | { |
|
296 | $repository = $this->getRepository(); |
|
297 | $fieldTypeService = $repository->getFieldTypeService(); |
|
298 | $fieldType = $fieldTypeService->getFieldType($this->getTypeName()); |
|
299 | ||
300 | if (!$fieldType->isSearchable()) { |
|
301 | $this->markTestSkipped("Field type '{$this->getTypeName()}' is not searchable."); |
|
302 | } |
|
303 | ||
304 | $this->checkSearchEngineSupport(); |
|
305 | ||
306 | $contentType = $this->testCreateContentType(); |
|
307 | ||
308 | $context = [ |
|
309 | $repository, |
|
310 | $this->createTestSearchContent( |
|
311 | $this->getValidSearchValueOne(), |
|
312 | $repository, |
|
313 | $contentType |
|
314 | )->id, |
|
315 | $this->createTestSearchContent( |
|
316 | $this->getValidSearchValueTwo(), |
|
317 | $repository, |
|
318 | $contentType |
|
319 | )->id, |
|
320 | ]; |
|
321 | ||
322 | $this->refreshSearch($repository); |
|
323 | ||
324 | return $context; |
|
325 | } |
|
326 | ||
327 | /** |
|
328 | * Provider method for testFind* methods. |
@@ 140-171 (lines=32) @@ | ||
137 | * |
|
138 | * @return \eZ\Publish\API\Repository\Repository |
|
139 | */ |
|
140 | public function testCreateMultivaluedTestContent() |
|
141 | { |
|
142 | $repository = $this->getRepository(); |
|
143 | $fieldTypeService = $repository->getFieldTypeService(); |
|
144 | $fieldType = $fieldTypeService->getFieldType($this->getTypeName()); |
|
145 | ||
146 | if (!$fieldType->isSearchable()) { |
|
147 | $this->markTestSkipped("Field type '{$this->getTypeName()}' is not searchable."); |
|
148 | } |
|
149 | ||
150 | $this->checkSearchEngineSupport(); |
|
151 | ||
152 | $contentType = $this->createTestContentType(); |
|
153 | ||
154 | $context = [ |
|
155 | $repository, |
|
156 | $this->createTestSearchContent( |
|
157 | $this->getValidMultivaluedSearchValuesOne(), |
|
158 | $repository, |
|
159 | $contentType |
|
160 | )->id, |
|
161 | $this->createTestSearchContent( |
|
162 | $this->getValidMultivaluedSearchValuesTwo(), |
|
163 | $repository, |
|
164 | $contentType |
|
165 | )->id, |
|
166 | ]; |
|
167 | ||
168 | $this->refreshSearch($repository); |
|
169 | ||
170 | return $context; |
|
171 | } |
|
172 | ||
173 | /** |
|
174 | * Provider method for testFind* methods. |