]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/UtilsTest.php
Improve autoLocale() detection
[github/shaarli/Shaarli.git] / tests / UtilsTest.php
index c885f552350b62cf003921c5b36673b3224eea14..b8f608b9ee409409eadbc4f8a27efa2231349435 100644 (file)
@@ -282,4 +282,24 @@ class UtilsTest extends PHPUnit_Framework_TestCase
         $this->assertEquals('', normalize_spaces(''));
         $this->assertEquals(null, normalize_spaces(null));
     }
+
+    /**
+     * Test arrays_combine
+     */
+    public function testArraysCombination()
+    {
+        $arr = [['ab', 'cd'], ['ef', 'gh'], ['ij', 'kl'], ['m']];
+        $expected = [
+            'abefijm',
+            'cdefijm',
+            'abghijm',
+            'cdghijm',
+            'abefklm',
+            'cdefklm',
+            'abghklm',
+            'cdghklm',
+        ];
+        $this->assertEquals($expected, arrays_combination($arr));
+    }
+
 }