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); }
/** * @expectedException Drupony\Component\DependencyInjection\Exception\VariableTruncateException */ public function testDruponyClearVariableBag() { $drupony = new Drupony(static::$cacheDir, Drupony::CACHE_FULL, __FUNCTION__); $drupony->getContainer()->getVariableBag()->clear(); }