@@ -8,27 +8,27 @@ class CreateIndexesTest extends TestCase
8
8
{
9
9
/**
10
10
* @expectedException MongoDB\Exception\InvalidArgumentException
11
- * @expectedExceptionMessage $indexes is empty
11
+ * @expectedExceptionMessage $indexes is not a list (unexpected index: "1")
12
12
*/
13
- public function testCreateIndexesRequiresAtLeastOneIndex ()
13
+ public function testConstructorIndexesArgumentMustBeAList ()
14
14
{
15
- new CreateIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), []);
15
+ new CreateIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [1 => [ ' key ' => [ ' x ' => 1 ]] ]);
16
16
}
17
17
18
18
/**
19
19
* @expectedException MongoDB\Exception\InvalidArgumentException
20
- * @expectedExceptionMessage $indexes is not a list (unexpected index: "1")
20
+ * @expectedExceptionMessage $indexes is empty
21
21
*/
22
- public function testConstructorIndexesArgumentMustBeAList ()
22
+ public function testConstructorRequiresAtLeastOneIndex ()
23
23
{
24
- new CreateIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [1 => [ ' key ' => [ ' x ' => 1 ]] ]);
24
+ new CreateIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), []);
25
25
}
26
26
27
27
/**
28
28
* @expectedException MongoDB\Exception\InvalidArgumentException
29
29
* @dataProvider provideInvalidIndexSpecificationTypes
30
30
*/
31
- public function testCreateIndexesRequiresIndexSpecificationsToBeAnArray ($ index )
31
+ public function testConstructorRequiresIndexSpecificationsToBeAnArray ($ index )
32
32
{
33
33
new CreateIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [$ index ]);
34
34
}
0 commit comments