File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -48,4 +48,25 @@ public function testIndexingEmptyEntity(): void
48
48
$ this ->assertInstanceOf (ApiException::class, $ e );
49
49
}
50
50
}
51
+
52
+ public function testRemovingMultipleEntity (): void
53
+ {
54
+ $ post1 = $ this ->createSearchablePost ();
55
+ $ post2 = $ this ->createSearchablePost ();
56
+
57
+ $ result = $ this ->engine ->remove ([$ post1 , $ post2 ]);
58
+
59
+ $ this ->assertArrayHasKey ('sf_phpunit__posts ' , $ result );
60
+ $ this ->assertCount (2 , $ result ['sf_phpunit__posts ' ]);
61
+
62
+ $ this ->waitForAllTasks ();
63
+
64
+ foreach ([$ post1 , $ post2 ] as $ post ) {
65
+ $ searchResult = $ this ->engine ->search ('' , $ post ->getIndexUid (), []);
66
+
67
+ $ this ->assertArrayHasKey ('hits ' , $ searchResult );
68
+ $ this ->assertIsArray ($ searchResult ['hits ' ]);
69
+ $ this ->assertEmpty ($ searchResult ['hits ' ]);
70
+ }
71
+ }
51
72
}
You can’t perform that action at this time.
0 commit comments