Added test coverage for ES store
This commit is contained in:
parent
77f2b99a3e
commit
474cbfa979
|
@ -69,7 +69,6 @@ class MappingBuilder
|
|||
return $mapping;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* create type mapping object
|
||||
*
|
||||
|
|
|
@ -28,6 +28,9 @@ class MappingToElasticaTest extends WebTestCase
|
|||
$mapping = $type->getMapping();
|
||||
|
||||
$this->assertNotEmpty($mapping, 'Mapping was populated');
|
||||
$this->assertArrayHasKey('store', $mapping['type']['properties']['field1']);
|
||||
$this->assertTrue($mapping['type']['properties']['field1']['store']);
|
||||
$this->assertArrayNotHasKey('store', $mapping['type']['properties']['field2']);
|
||||
}
|
||||
|
||||
public function testResetType()
|
||||
|
@ -40,6 +43,9 @@ class MappingToElasticaTest extends WebTestCase
|
|||
$mapping = $type->getMapping();
|
||||
|
||||
$this->assertNotEmpty($mapping, 'Mapping was populated');
|
||||
$this->assertArrayHasKey('store', $mapping['type']['properties']['field1']);
|
||||
$this->assertTrue($mapping['type']['properties']['field1']['store']);
|
||||
$this->assertArrayNotHasKey('store', $mapping['type']['properties']['field2']);
|
||||
}
|
||||
|
||||
public function testORMResetIndexAddsMappings()
|
||||
|
|
|
@ -38,6 +38,7 @@ fos_elastica:
|
|||
field1: ~
|
||||
field2:
|
||||
type: integer
|
||||
store: false
|
||||
date: { boost: 5 }
|
||||
title: { boost: 8, analyzer: my_analyzer }
|
||||
content: ~
|
||||
|
|
Loading…
Reference in a new issue