コード例 #1
0
 /**
  * @group GH-103
  */
 public function testLoggerFactory()
 {
     $options = array('page' => array('frontend' => array('options' => array('logging' => true, 'logger' => array(new Zend_Log_Writer_Mock())))));
     $resource = new Zend_Application_Resource_Cachemanager($options);
     $resource->setBootstrap($this->bootstrap);
     $resource->init();
     $page = $resource->getCacheManager()->getCache('page');
     $page->getBackend()->clean(Zend_Cache::CLEANING_MODE_OLD);
     $event = current($options['page']['frontend']['options']['logger'][0]->events);
     $this->assertTrue(is_array($event));
     $this->assertTrue(array_key_exists('message', $event));
     $this->assertContains('Zend_Cache_Backend_Static', $event['message']);
 }