This commit is contained in:
Oliver Davies 2020-07-04 10:41:21 +01:00
parent 44a3ef971d
commit 53140ead8a
4 changed files with 341 additions and 159 deletions

14
tests/AnagramTest.php Normal file
View file

@ -0,0 +1,14 @@
<?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());
});