assertEquals( Utils::suggestionList('', ['a']), ['a'] ); } /** * @it Returns empty array when there are no options */ public function testReturnsEmptyArrayWhenThereAreNoOptions() { $this->assertEquals( Utils::suggestionList('input', []), [] ); } /** * @it Returns options sorted based on similarity */ public function testReturnsOptionsSortedBasedOnSimilarity() { $this->assertEquals( Utils::suggestionList('abc', ['a', 'ab', 'abc']), ['abc', 'ab'] ); } }