コード例 #1
0
 /**
  * @test
  * @author Robert Lemke <*****@*****.**>
  * @author Ingo Renner <*****@*****.**>
  */
 public function hasCacheReturnsCorrectResult()
 {
     $manager = new t3lib_cache_Manager();
     $backend = $this->getMock('t3lib_cache_backend_AbstractBackend', array(), array(), '', FALSE);
     $cache1 = $this->getMock('t3lib_cache_frontend_AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag'), array(), '', FALSE);
     $cache1->expects($this->atLeastOnce())->method('getIdentifier')->will($this->returnValue('cache1'));
     $manager->registerCache($cache1);
     $this->assertTrue($manager->hasCache('cache1'), 'hasCache() did not return TRUE.');
     $this->assertFalse($manager->hasCache('cache2'), 'hasCache() did not return FALSE.');
 }