Skip to content

Commit 5936775

Browse files
committed
Rename and reorder CreateIndexes tests
1 parent aef1ef7 commit 5936775

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/Operation/CreateIndexesTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ class CreateIndexesTest extends TestCase
88
{
99
/**
1010
* @expectedException MongoDB\Exception\InvalidArgumentException
11-
* @expectedExceptionMessage $indexes is empty
11+
* @expectedExceptionMessage $indexes is not a list (unexpected index: "1")
1212
*/
13-
public function testCreateIndexesRequiresAtLeastOneIndex()
13+
public function testConstructorIndexesArgumentMustBeAList()
1414
{
15-
new CreateIndexes($this->getDatabaseName(), $this->getCollectionName(), []);
15+
new CreateIndexes($this->getDatabaseName(), $this->getCollectionName(), [1 => ['key' => ['x' => 1]]]);
1616
}
1717

1818
/**
1919
* @expectedException MongoDB\Exception\InvalidArgumentException
20-
* @expectedExceptionMessage $indexes is not a list (unexpected index: "1")
20+
* @expectedExceptionMessage $indexes is empty
2121
*/
22-
public function testConstructorIndexesArgumentMustBeAList()
22+
public function testConstructorRequiresAtLeastOneIndex()
2323
{
24-
new CreateIndexes($this->getDatabaseName(), $this->getCollectionName(), [1 => ['key' => ['x' => 1]]]);
24+
new CreateIndexes($this->getDatabaseName(), $this->getCollectionName(), []);
2525
}
2626

2727
/**
2828
* @expectedException MongoDB\Exception\InvalidArgumentException
2929
* @dataProvider provideInvalidIndexSpecificationTypes
3030
*/
31-
public function testCreateIndexesRequiresIndexSpecificationsToBeAnArray($index)
31+
public function testConstructorRequiresIndexSpecificationsToBeAnArray($index)
3232
{
3333
new CreateIndexes($this->getDatabaseName(), $this->getCollectionName(), [$index]);
3434
}

0 commit comments

Comments
 (0)