php-katas-with-pest/tests/AnagramTest.php
2020-07-04 11:20:53 +01:00

15 lines
273 B
PHP

<?php
declare(strict_types=1);
use App\Anagram;
it('selects the correct anagrams for a word', function () {
$matches = Anagram::forWord(
'listen',
['enlists', 'google', 'inlets', 'banana']
);
assertSame(['inlets'], $matches->toArray());
});