We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b05310 commit a5739e0Copy full SHA for a5739e0
tests/AtlasSearchTest.php
@@ -12,6 +12,7 @@
12
use MongoDB\Laravel\Tests\Models\Book;
13
14
use function assert;
15
+use function sort;
16
use function usleep;
17
use function usort;
18
@@ -193,10 +194,13 @@ public function testDatabaseBuilderAutocomplete()
193
194
195
self::assertInstanceOf(LaravelCollection::class, $results);
196
self::assertCount(3, $results);
197
+ // Sort results, because order is not guaranteed
198
+ $results = $results->all();
199
+ sort($results);
200
self::assertSame([
- 'Operating System Concepts',
201
'Database System Concepts',
202
'Modern Operating Systems',
- ], $results->all());
203
+ 'Operating System Concepts',
204
+ ], $results);
205
}
206
0 commit comments