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

testExtractWithNameCondition() public method

    public function testExtractWithNameCondition()
    {
        $multiple = array(array('CallType' => array('name' => 'Internal Voice'), 'x' => array('hour' => 7)), array('CallType' => array('name' => 'Internal Voice'), 'x' => array('hour' => 2)), array('CallType' => array('name' => 'Internal Voice'), 'x' => array('hour' => 1)));
        $expected = array(7, 2, 1);
        $result = Set::extract($multiple, '/CallType[name=Internal Voice]/../x/hour');
        $this->assertEqual($expected, $result);
    }