示例#1
0
 public function testDruponyCacheClear()
 {
     $drupony = new Drupony(drupony_get_cache_dir('container'), Drupony::CACHE_FULL, __FUNCTION__);
     $this->assertFileNotExists($drupony->getCacheFilePath());
     $drupony->getContainer();
     $this->assertFileExists($drupony->getCacheFilePath());
     drupony_clear_cache('container');
     $this->assertFileNotExists($drupony->getCacheFilePath());
     $this->assertFileExists(static::$cacheDir);
     $drupony = new Drupony(drupony_get_cache_dir('container'), Drupony::CACHE_FULL, __FUNCTION__);
     $drupony->getContainer();
     $this->assertFileExists($drupony->getCacheFilePath());
     drupony_flush_caches();
     $this->assertFileNotExists($drupony->getCacheFilePath());
     $this->assertFileExists(static::$cacheDir);
 }
示例#2
0
 /**
  * @expectedException Drupony\Component\DependencyInjection\Exception\VariableTruncateException
  */
 public function testDruponyClearVariableBag()
 {
     $drupony = new Drupony(static::$cacheDir, Drupony::CACHE_FULL, __FUNCTION__);
     $drupony->getContainer()->getVariableBag()->clear();
 }