|
|
@@ -129,7 +129,7 @@ class Zend_Application_Resource_CacheManagerTest extends PHPUnit_Framework_TestC
|
|
|
$this->assertEquals('/foo', $cacheTemplate['backend']['options']['cache_dir']);
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public function testShouldCreateNewCacheTemplateIfConfigNotMatchesADefaultTemplate()
|
|
|
{
|
|
|
$options = array(
|
|
|
@@ -146,7 +146,7 @@ class Zend_Application_Resource_CacheManagerTest extends PHPUnit_Framework_TestC
|
|
|
$cacheTemplate = $manager->getCacheTemplate('foo');
|
|
|
$this->assertSame($options['foo'], $cacheTemplate);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public function testShouldNotMeddleWithFrontendOrBackendCapitalisation()
|
|
|
{
|
|
|
$options = array(
|
|
|
@@ -182,6 +182,34 @@ class Zend_Application_Resource_CacheManagerTest extends PHPUnit_Framework_TestC
|
|
|
$cache = $manager->getCache('foo');
|
|
|
$this->assertTrue($cache instanceof Zend_Cache_Core);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @group ZF-9738
|
|
|
+ */
|
|
|
+ public function testZendServer()
|
|
|
+ {
|
|
|
+ if (!function_exists('zend_disk_cache_store')) {
|
|
|
+ $this->markTestSkipped('ZendServer is required for this test');
|
|
|
+ }
|
|
|
+
|
|
|
+ $options = array(
|
|
|
+ 'foo' => array(
|
|
|
+ 'frontend' => array(
|
|
|
+ 'name' => 'Core',
|
|
|
+ 'options' => array(
|
|
|
+ 'lifetime' => 7200,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ 'backend' => array(
|
|
|
+ 'name' => 'ZendServer_Disk',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ $resource = new Zend_Application_Resource_Cachemanager($options);
|
|
|
+ $manager = $resource->init();
|
|
|
+ $cache = $manager->getCache('foo')->getBackend();
|
|
|
+ $this->assertTrue($cache instanceof Zend_Cache_Backend_ZendServer_Disk);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (PHPUnit_MAIN_METHOD == 'Zend_Application_Resource_CacheManagerTest::main') {
|