public static function init() { $cache = new \Gregwar\Cache\Cache(); $cache->setCacheDirectory(CACHE_DIR); return $cache; }
/** * Testing caching a form */ public function testCache() { $cache = new Gregwar\Cache\Cache(); $cache->setCacheDirectory($this->getCacheDirectory()); $form = $this->getForm('basic.html', null, $cache); $html = "{$form}"; $this->assertContains('toto', $html); $this->assertEquals(false, $form->isCached); $form = $this->getForm('basic.html', null, $cache); $html = "{$form}"; $this->assertContains('toto', $html); $this->assertEquals(true, $form->isCached); }