public function setUp() { if (!class_exists('Zend_Log') || !class_exists('Zend_Log_Adapter_Null')) { Zend::loadClass('Zend_Log'); Zend::loadClass('Zend_Log_Adapter_Null'); } if (!Zend_Log::hasLogger('LOG')) { Zend_Log::registerLogger(new Zend_Log_Adapter_Null(), 'LOG'); } $this->_instance->setDirectives(array('logging' => true)); $this->_instance->save('bar : data to cache', 'bar', array('tag3', 'tag4')); $this->_instance->save('bar2 : data to cache', 'bar2', array('tag3', 'tag1')); $this->_instance->save('bar3 : data to cache', 'bar3', array('tag2', 'tag3')); }
/** * * @todo make logfile/loggers configurable */ static function registerLoggers() { Zend_Log::registerLogger(new Zend_Log_Adapter_File('logs/partycal.log')); }
require_once 'FactoryTest.php'; require_once 'CoreTest.php'; require_once 'FileBackendTest.php'; require_once 'SqliteBackendTest.php'; require_once 'OutputFrontendTest.php'; require_once 'FunctionFrontendTest.php'; require_once 'ClassFrontendTest.php'; require_once 'FileFrontendTest.php'; require_once 'ApcBackendTest.php'; require_once 'MemcachedBackendTest.php'; require_once 'PageFrontendTest.php'; require_once 'ZendPlatformBackendTest.php'; // Zend_Log require_once 'Zend/Log.php'; require_once 'Zend/Log/Adapter/Null.php'; Zend_Log::registerLogger(new Zend_Log_Adapter_Null()); class Zend_Cache_AllTests { public static function main() { PHPUnit_TextUI_TestRunner::run(self::suite()); } public static function suite() { $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Cache'); $suite->addTestSuite('Zend_Cache_FactoryTest'); $suite->addTestSuite('Zend_Cache_CoreTest'); $suite->addTestSuite('Zend_Cache_FileBackendTest'); $suite->addTestSuite('Zend_Cache_OutputFrontendTest'); $suite->addTestSuite('Zend_Cache_FunctionFrontendTest'); $suite->addTestSuite('Zend_Cache_ClassFrontendTest');