@@ -141,18 +141,17 @@ public function testNoSource()
141
141
$ type = new Type ($ index , 'user ' );
142
142
$ mapping = new Mapping ($ type , array (
143
143
'id ' => array ('type ' => 'integer ' , 'store ' => 'yes ' ),
144
- 'username ' => array ('type ' => 'string ' , 'store ' => 'no ' ),
144
+ 'username ' => array ('type ' => 'string ' , 'store ' => 'no ' )
145
145
));
146
146
$ mapping ->setSource (array ('enabled ' => false ));
147
147
$ type ->setMapping ($ mapping );
148
148
149
149
$ mapping = $ type ->getMapping ();
150
150
151
- $ this ->assertArrayHasKey ('user ' , $ mapping );
152
- $ this ->assertArrayHasKey ('properties ' , $ mapping ['user ' ]);
153
- $ this ->assertArrayHasKey ('id ' , $ mapping ['user ' ]['properties ' ]);
154
- $ this ->assertArrayHasKey ('type ' , $ mapping ['user ' ]['properties ' ]['id ' ]);
155
- $ this ->assertEquals ('integer ' , $ mapping ['user ' ]['properties ' ]['id ' ]['type ' ]);
151
+ $ this ->assertEquals (array (
152
+ 'id ' => array ('type ' => 'integer ' , 'store ' => true ),
153
+ 'username ' => array ('type ' => 'string ' )
154
+ ), $ mapping );
156
155
157
156
// Adds 1 document to the index
158
157
$ doc1 = new Document (1 ,
@@ -787,7 +786,7 @@ public function testGetMapping() {
787
786
$ client = $ index ->getClient ();
788
787
789
788
$ this ->assertEquals (
790
- array ( ' test-type ' => array ( ' properties ' => $ expect)) ,
789
+ $ expect ,
791
790
$ client ->getIndex ($ indexName )->getType ($ typeName )->getMapping ()
792
791
);
793
792
}
@@ -808,7 +807,7 @@ public function testGetMappingAlias() {
808
807
$ client = $ index ->getClient ();
809
808
810
809
$ this ->assertEquals (
811
- array ( ' test-alias-type ' => array ( ' properties ' => $ expect)) ,
810
+ $ expect ,
812
811
$ client ->getIndex ($ aliasName )->getType ($ typeName )->getMapping ()
813
812
);
814
813
}
0 commit comments