updating view test case for enhancement

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7273 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-06-26 21:04:46 +00:00
parent d000c59ceb
commit 924ca38fea

View file

@ -610,25 +610,30 @@ class ViewTest extends CakeTestCase {
@unlink($path);
}
/**
* testRenderNocache method
* testRenderNocache method
*
* @access public
* @return void
*/
/* This is a new test case for a pending enhancement
function testRenderNocache() {
$this->PostsController->helpers = array('Cache', 'Html');
$this->PostsController->constructClasses();
$this->PostsController->cacheAction = 21600;
$this->PostsController->here = '/posts/nocache_multiple_element';
$this->PostsController->action = 'nocache_multiple_element';
$this->PostsController->nocache_multiple_element();
Configure::write('Cache.check', true);
Configure::write('Cache.disable', false);
$View = new TestView($this->PostsController);
$View->render('nocache_multiple_element');
$filename = CACHE . 'views' . DS . 'posts_nocache_multiple_element.php';
$result = file_get_contents($filename);
$View = new TestView($this->PostsController);
$View->render();
ob_start();
$View->renderCache($filename, getMicroTime());
$result = ob_get_clean();
@unlink($filename);
$this->assertPattern('/php echo \$foo;/', $result);
@ -640,6 +645,7 @@ class ViewTest extends CakeTestCase {
$this->assertPattern('/php echo \$foobar;/', $result);
$this->assertPattern('/printing: "in sub1"/', $result);
}
*/
/**
* testSet method
*