CacheBehaviorTestCase::testFind PHP Метод

testFind() публичный Метод

public testFind ( )
    function testFind()
    {
        $results = $this->CacheData->find('all', array('conditions' => array('CacheData.name LIKE' => '%cache%')));
        $results = Set::extract('/CacheData/name', $results);
        $expected = array('A Cached Thing', 'Cache behavior');
        $this->assertEquals($results, $expected);
        // test that it's pulling from the cache
        $this->CacheData->delete(1);
        $results = $this->CacheData->find('all', array('conditions' => array('CacheData.name LIKE' => '%cache%')));
        $results = Set::extract('/CacheData/name', $results);
        $expected = array('A Cached Thing', 'Cache behavior');
        $this->assertEquals($results, $expected);
    }