From 5bfba4b2029ff3bbbf4548d0d89930fbdebe31dc Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 12 Sep 2018 21:36:19 +0200 Subject: [PATCH] Extend permutation test for other return --- tests/Utils/PermutationTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Utils/PermutationTest.php b/tests/Utils/PermutationTest.php index 1d2841f58..b48f15529 100644 --- a/tests/Utils/PermutationTest.php +++ b/tests/Utils/PermutationTest.php @@ -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()