Skip to content

Commit 192ff0d

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

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/AtlasSearchTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,11 @@ public function testDatabaseBuilderAutocomplete()
193193

194194
self::assertInstanceOf(LaravelCollection::class, $results);
195195
self::assertCount(3, $results);
196+
// Sort results, because order is not guaranteed
196197
self::assertSame([
197-
'Operating System Concepts',
198-
'Database System Concepts',
199-
'Modern Operating Systems',
200-
], $results->all());
198+
1 => 'Database System Concepts',
199+
2 => 'Modern Operating Systems',
200+
0 => 'Operating System Concepts',
201+
], $results->sort()->all());
201202
}
202203
}

0 commit comments

Comments
 (0)