mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
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:
parent
d000c59ceb
commit
924ca38fea
1 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue