Add integration testing around _parent mapping

This commit is contained in:
Tim Nagel 2015-01-22 09:06:21 +11:00
parent 32d190f554
commit 401446e1c4

View file

@ -32,11 +32,15 @@ class MappingToElasticaTest extends WebTestCase
$this->assertTrue($mapping['type']['properties']['field1']['store']); $this->assertTrue($mapping['type']['properties']['field1']['store']);
$this->assertArrayNotHasKey('store', $mapping['type']['properties']['field2']); $this->assertArrayNotHasKey('store', $mapping['type']['properties']['field2']);
$parent = $this->getType($client, 'parent'); $type = $this->getType($client, 'type');
$mapping = $parent->getMapping(); $mapping = $type->getMapping()['type'];
$this->assertEquals('parent', $mapping['_parent']['type']);
$this->assertEquals('my_analyzer', $mapping['parent']['index_analyzer']); $parent = $this->getType($client, 'parent');
$this->assertEquals('whitespace', $mapping['parent']['search_analyzer']); $mapping = $parent->getMapping()['parent'];
$this->assertEquals('my_analyzer', $mapping['index_analyzer']);
$this->assertEquals('whitespace', $mapping['search_analyzer']);
} }
public function testResetType() public function testResetType()