@@ 241-247 (lines=7) @@ | ||
238 | } |
|
239 | ||
240 | ||
241 | foreach($shouldBeDate as $fieldName) { |
|
242 | $fieldProperties = $properties[$fieldName]; |
|
243 | $type = $fieldProperties['type']; |
|
244 | $this->assertEquals(2, sizeof(array_keys($fieldProperties))); |
|
245 | $this->assertEquals('date', $type); |
|
246 | $this->assertEquals('y-M-d', $fieldProperties['format']); |
|
247 | } |
|
248 | ||
249 | ||
250 | ||
@@ 252-258 (lines=7) @@ | ||
249 | ||
250 | ||
251 | // check date time, stored in Elasticsearch as a date with a different format than above |
|
252 | foreach($shouldBeDateTime as $fieldName) { |
|
253 | $fieldProperties = $properties[$fieldName]; |
|
254 | $type = $fieldProperties['type']; |
|
255 | $this->assertEquals(2, sizeof(array_keys($fieldProperties))); |
|
256 | $this->assertEquals('date', $type); |
|
257 | $this->assertEquals('y-M-d H:m:s', $fieldProperties['format']); |
|
258 | } |
|
259 | ||
260 | //check shutter speed is tokenized, ie not analyzed - for aggregation purposes |
|
261 | // |
|
@@ 262-273 (lines=12) @@ | ||
259 | ||
260 | //check shutter speed is tokenized, ie not analyzed - for aggregation purposes |
|
261 | // |
|
262 | foreach($shouldBeTokens as $fieldName) { |
|
263 | $fieldProperties = $properties[$fieldName]; |
|
264 | $type = $fieldProperties['type']; |
|
265 | $this->assertEquals('string', $type); |
|
266 | ||
267 | // check for no analysis |
|
268 | $analyzer = $fieldProperties['index']; |
|
269 | $this->assertEquals('not_analyzed', $analyzer); |
|
270 | ||
271 | // check for only 2 entries |
|
272 | $this->assertEquals(2, sizeof(array_keys($fieldProperties))); |
|
273 | } |
|
274 | } |
|
275 | ||
276 |