@@ -240,6 +240,7 @@ public function testCreateDeleteIndex()
240240 static ::getDatabase ()->createCollection ('indexes ' );
241241
242242 $ this ->assertEquals (true , static ::getDatabase ()->createAttribute ('indexes ' , 'string ' , Database::VAR_STRING , 128 , true ));
243+ $ this ->assertEquals (true , static ::getDatabase ()->createAttribute ('indexes ' , 'order ' , Database::VAR_STRING , 128 , true ));
243244 $ this ->assertEquals (true , static ::getDatabase ()->createAttribute ('indexes ' , 'integer ' , Database::VAR_INTEGER , 0 , true ));
244245 $ this ->assertEquals (true , static ::getDatabase ()->createAttribute ('indexes ' , 'float ' , Database::VAR_FLOAT , 0 , true ));
245246 $ this ->assertEquals (true , static ::getDatabase ()->createAttribute ('indexes ' , 'boolean ' , Database::VAR_BOOLEAN , 0 , true ));
@@ -249,15 +250,17 @@ public function testCreateDeleteIndex()
249250 $ this ->assertEquals (true , static ::getDatabase ()->createIndex ('indexes ' , 'index2 ' , Database::INDEX_KEY , ['float ' , 'integer ' ], [], [Database::ORDER_ASC , Database::ORDER_DESC ]));
250251 $ this ->assertEquals (true , static ::getDatabase ()->createIndex ('indexes ' , 'index3 ' , Database::INDEX_KEY , ['integer ' , 'boolean ' ], [], [Database::ORDER_ASC , Database::ORDER_DESC , Database::ORDER_DESC ]));
251252 $ this ->assertEquals (true , static ::getDatabase ()->createIndex ('indexes ' , 'index4 ' , Database::INDEX_UNIQUE , ['string ' ], [128 ], [Database::ORDER_ASC ]));
253+ $ this ->assertEquals (true , static ::getDatabase ()->createIndex ('indexes ' , 'order ' , Database::INDEX_UNIQUE , ['order ' ], [128 ], [Database::ORDER_ASC ]));
252254
253255 $ collection = static ::getDatabase ()->getCollection ('indexes ' );
254- $ this ->assertCount (4 , $ collection ->getAttribute ('indexes ' ));
256+ $ this ->assertCount (5 , $ collection ->getAttribute ('indexes ' ));
255257
256258 // Delete Indexes
257259 $ this ->assertEquals (true , static ::getDatabase ()->deleteIndex ('indexes ' , 'index1 ' ));
258260 $ this ->assertEquals (true , static ::getDatabase ()->deleteIndex ('indexes ' , 'index2 ' ));
259261 $ this ->assertEquals (true , static ::getDatabase ()->deleteIndex ('indexes ' , 'index3 ' ));
260262 $ this ->assertEquals (true , static ::getDatabase ()->deleteIndex ('indexes ' , 'index4 ' ));
263+ $ this ->assertEquals (true , static ::getDatabase ()->deleteIndex ('indexes ' , 'order ' ));
261264
262265 $ collection = static ::getDatabase ()->getCollection ('indexes ' );
263266 $ this ->assertCount (0 , $ collection ->getAttribute ('indexes ' ));
0 commit comments