@@ -11,38 +11,38 @@ public function testConstructorIndexesArgumentMustBeAList(): void
11
11
{
12
12
$ this ->expectException (InvalidArgumentException::class);
13
13
$ this ->expectExceptionMessage ('$indexes is not a list ' );
14
- new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [1 => ['name ' => 'index name ' , 'definition ' => ['mappings ' => ['dynamic ' => true ]]]]);
14
+ new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [1 => ['name ' => 'index name ' , 'definition ' => ['mappings ' => ['dynamic ' => true ]]]], [] );
15
15
}
16
16
17
17
/** @dataProvider provideInvalidIndexSpecificationTypes */
18
18
public function testConstructorIndexDefinitionMustBeADocument ($ index ): void
19
19
{
20
20
$ this ->expectException (InvalidArgumentException::class);
21
21
$ this ->expectExceptionMessage ('Expected $indexes[0] to have type "document" ' );
22
- new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [$ index ]);
22
+ new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [$ index ], [] );
23
23
}
24
24
25
25
/** @dataProvider provideInvalidStringValues */
26
26
public function testConstructorIndexNameMustBeAString ($ name ): void
27
27
{
28
28
$ this ->expectException (InvalidArgumentException::class);
29
29
$ this ->expectExceptionMessage ('Expected "name" option to have type "string" ' );
30
- new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [['name ' => $ name , 'definition ' => ['mappings ' => ['dynamic ' => true ]]]]);
30
+ new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [['name ' => $ name , 'definition ' => ['mappings ' => ['dynamic ' => true ]]]], [] );
31
31
}
32
32
33
33
public function testConstructorIndexDefinitionMustBeDefined (): void
34
34
{
35
35
$ this ->expectException (InvalidArgumentException::class);
36
36
$ this ->expectExceptionMessage ('Required "definition" document is missing from search index specification ' );
37
- new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [['name ' => 'index name ' ]]);
37
+ new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [['name ' => 'index name ' ]], [] );
38
38
}
39
39
40
40
/** @dataProvider provideInvalidDocumentValues */
41
41
public function testConstructorIndexDefinitionMustBeAnArray ($ definition ): void
42
42
{
43
43
$ this ->expectException (InvalidArgumentException::class);
44
44
$ this ->expectExceptionMessage ('Expected "definition" option to have type "document" ' );
45
- new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [['definition ' => $ definition ]]);
45
+ new CreateSearchIndexes ($ this ->getDatabaseName (), $ this ->getCollectionName (), [['definition ' => $ definition ]], [] );
46
46
}
47
47
48
48
public function provideInvalidIndexSpecificationTypes (): array
0 commit comments