Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function testMappingBuilderStoreProperty() |
||
21 | { |
||
22 | $typeConfig = new TypeConfig('typename', [ |
||
23 | 'properties' => [ |
||
24 | 'storeless' => [ |
||
25 | 'type' => 'string' |
||
26 | ], |
||
27 | 'stored' => [ |
||
28 | 'type' => 'string', |
||
29 | 'store' => true |
||
30 | ], |
||
31 | 'unstored' => [ |
||
32 | 'type' => 'string', |
||
33 | 'store' => false |
||
34 | ], |
||
35 | ] |
||
36 | ]); |
||
37 | |||
38 | $mapping = $this->builder->buildTypeMapping($typeConfig); |
||
39 | |||
40 | $this->assertArrayNotHasKey('store', $mapping['properties']['storeless']); |
||
41 | $this->assertArrayHasKey('store', $mapping['properties']['stored']); |
||
42 | $this->assertTrue($mapping['properties']['stored']['store']); |
||
43 | $this->assertArrayHasKey('store', $mapping['properties']['unstored']); |
||
44 | $this->assertFalse($mapping['properties']['unstored']['store']); |
||
45 | } |
||
46 | |||
47 | } |