Esempio n. 1
0
 public function testCtorWithConfigurator()
 {
     $configuredOptions = new ezcCacheStackOptions();
     ezcCacheStackTestConfigurator::$options = $configuredOptions;
     ezcCacheStackTestConfigurator::$storages = array(new ezcCacheStackStorageConfiguration('1', new ezcCacheStorageFileArray($this->createTempDir(__CLASS__)), 10, 0.4));
     $options = new ezcCacheStackOptions();
     $location = 'foo';
     $options->configurator = 'ezcCacheStackTestConfigurator';
     $stack = new ezcCacheStack($location, $options);
     $this->assertSame($configuredOptions, $stack->options);
     $this->assertAttributeEquals(ezcCacheStackTestConfigurator::$storages, 'storageStack', $stack);
     $this->removeTempDir();
 }
 public static function reset()
 {
     self::$storages = array();
     self::$metaStorage = null;
     self::$options = null;
 }