Skip to content

Commit df688b1

Browse files
committed
Sort autocomplete results as order is not garanteed
1 parent 6b05310 commit df688b1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: tests/AtlasSearchTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,13 @@ public function testDatabaseBuilderAutocomplete()
193193

194194
self::assertInstanceOf(LaravelCollection::class, $results);
195195
self::assertCount(3, $results);
196+
// Sort results, because order is not guaranteed
197+
$results = $results->all();
198+
sort($results);
196199
self::assertSame([
197-
'Operating System Concepts',
198200
'Database System Concepts',
199201
'Modern Operating Systems',
200-
], $results->all());
202+
'Operating System Concepts',
203+
], $results);
201204
}
202205
}

0 commit comments

Comments
 (0)