Browse Source

Add separate test case for the case of multidimensional arrays

Alexandros Solanos 9 years ago
parent
commit
c49ddd09e0
1 changed files with 9 additions and 2 deletions
  1. 9 2
      tests/TestCase/Collection/CollectionTest.php

+ 9 - 2
tests/TestCase/Collection/CollectionTest.php

@@ -1899,9 +1899,16 @@ class CollectionTest extends TestCase
         ];
 
         $this->assertEquals($expected, $result->toList());
+    }
 
-        $this->expectException(\LogicException::class);
-
+    /**
+     * Tests that an exception is thrown if the cartesian product is called with multidimensional arrays
+     *
+     * @expectedException \LogicException
+     * @return void
+     */
+    public function testCartesianProductMultidimensionalArray()
+    {
         $collection = new Collection([
             [
                 'names' => [