Anagrams
This commit is contained in:
parent
44a3ef971d
commit
53140ead8a
4 changed files with 341 additions and 159 deletions
14
tests/AnagramTest.php
Normal file
14
tests/AnagramTest.php
Normal 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());
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue