mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Extend permutation test for other return
This commit is contained in:
parent
efb6421289
commit
5bfba4b202
|
|
@ -21,10 +21,12 @@ class PermutationTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
public function testPermute()
|
||||
{
|
||||
$arr = ['a', 'b', 'c'];
|
||||
$permutations = ['abc', 'acb', 'bac', 'bca', 'cab', 'cba'];
|
||||
$arr = ['a', 'b', 'c'];
|
||||
$permutations = ['abc', 'acb', 'bac', 'bca', 'cab', 'cba'];
|
||||
$permutations2 = [['a', 'b', 'c'], ['a', 'c', 'b'], ['b', 'a', 'c'], ['b', 'c', 'a'], ['c', 'a', 'b'], ['c', 'b', 'a']];
|
||||
|
||||
self::assertEquals($permutations, Permutation::permut($arr));
|
||||
self::assertEquals($permutations2, Permutation::permut($arr, [], false));
|
||||
}
|
||||
|
||||
public function testIsPermutation()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user