lithium\tests\cases\data\collection\RecordSetTest::testRecordSetFindFilter PHP Method

testRecordSetFindFilter() public method

    public function testRecordSetFindFilter()
    {
        $expected = array(1 => array('id' => 1, 'data' => 'data1'), 2 => array('id' => 2, 'data' => 'data2'), 3 => array('id' => 3, 'data' => 'data3'), 4 => array('id' => 4, 'data' => 'data4'));
        $records = $this->_recordSet->find(function ($item) {
            return true;
        });
        $this->assertEqual($expected, $records->to('array'));
    }