lithium\tests\cases\util\SetTest::testDepthThreeLevelsWithAll PHP Method

testDepthThreeLevelsWithAll() public method

    public function testDepthThreeLevelsWithAll()
    {
        $data = array('1' => array('1.1' => '1.1.1'), '2', '3' => array('3.1' => array('3.1.1' => '3.1.1.1')));
        $result = Set::depth($data, array('all' => true));
        $this->assertEqual(3, $result);
        $data = array('1' => array('1.1' => '1.1.1'), array('2' => array('2.1' => array('2.1.1' => '2.1.1.1'))), '3' => array('3.1' => array('3.1.1' => '3.1.1.1')));
        $result = Set::depth($data, array('all' => true));
        $this->assertEqual(4, $result);
        $data = array('1' => array('1.1' => '1.1.1'), array('2' => array('2.1' => array('2.1.1' => array('2.1.1.1')))), '3' => array('3.1' => array('3.1.1' => '3.1.1.1')));
        $result = Set::depth($data, array('all' => true));
        $this->assertEqual(5, $result);
        $data = array('1' => array('1.1' => '1.1.1'), array('2' => array('2.1' => array('2.1.1' => array('2.1.1.1' => '2.1.1.1.1')))), '3' => array('3.1' => array('3.1.1' => '3.1.1.1')));
        $result = Set::depth($data, array('all' => true));
        $this->assertEqual(5, $result);
    }