|
|
@@ -251,20 +251,20 @@ class CacheHelperTest extends CakeTestCase {
|
|
|
$result = $View->render('sequencial_nocache');
|
|
|
|
|
|
$this->assertNotRegExp('/cake:nocache/', $result);
|
|
|
- $this->assertNotRegExp('/php echo/', $result);
|
|
|
+ $this->assertNotRegExpy('/php echo/', $result);
|
|
|
$this->assertRegExp('/A\. Layout Before Content/', $result);
|
|
|
$this->assertRegExp('/B\. In Plain Element/', $result);
|
|
|
$this->assertRegExp('/C\. Layout After Test Element/', $result);
|
|
|
$this->assertRegExp('/D\. In View File/', $result);
|
|
|
$this->assertRegExp('/E\. Layout After Content/', $result);
|
|
|
- //$this->assertRegExp('/F\. In Element With No Cache Tags/', $result);
|
|
|
+ $this->assertRegExp('/F\. In Element With No Cache Tags/', $result);
|
|
|
$this->assertRegExp('/G\. Layout After Content And After Element With No Cache Tags/', $result);
|
|
|
$this->assertNotRegExp('/1\. layout before content/', $result);
|
|
|
$this->assertNotRegExp('/2\. in plain element/', $result);
|
|
|
$this->assertNotRegExp('/3\. layout after test element/', $result);
|
|
|
$this->assertNotRegExp('/4\. in view file/', $result);
|
|
|
$this->assertNotRegExp('/5\. layout after content/', $result);
|
|
|
- //$this->assertNotRegExp('/6\. in element with no cache tags/', $result);
|
|
|
+ $this->assertNotRegExp('/6\. in element with no cache tags/', $result);
|
|
|
$this->assertNotRegExp('/7\. layout after content and after element with no cache tags/', $result);
|
|
|
|
|
|
$filename = CACHE . 'views' . DS . 'cachetest_cache_complex.php';
|
|
|
@@ -277,14 +277,14 @@ class CacheHelperTest extends CakeTestCase {
|
|
|
$this->assertRegExp('/C\. Layout After Test Element/', $contents);
|
|
|
$this->assertRegExp('/D\. In View File/', $contents);
|
|
|
$this->assertRegExp('/E\. Layout After Content/', $contents);
|
|
|
- //$this->assertRegExp('/F\. In Element With No Cache Tags/', $contents);
|
|
|
+ $this->assertRegExp('/F\. In Element With No Cache Tags/', $contents);
|
|
|
$this->assertRegExp('/G\. Layout After Content And After Element With No Cache Tags/', $contents);
|
|
|
$this->assertRegExp('/1\. layout before content/', $contents);
|
|
|
$this->assertNotRegExp('/2\. in plain element/', $contents);
|
|
|
$this->assertRegExp('/3\. layout after test element/', $contents);
|
|
|
$this->assertRegExp('/4\. in view file/', $contents);
|
|
|
$this->assertRegExp('/5\. layout after content/', $contents);
|
|
|
- //$this->assertRegExp('/6\. in element with no cache tags/', $contents);
|
|
|
+ $this->assertRegExp('/6\. in element with no cache tags/', $contents);
|
|
|
$this->assertRegExp('/7\. layout after content and after element with no cache tags/', $contents);
|
|
|
}
|
|
|
|
|
|
@@ -551,10 +551,10 @@ class CacheHelperTest extends CakeTestCase {
|
|
|
$Cache = $this->getMock('CacheHelper', array('_parseContent'), array($View));
|
|
|
$Cache->expects($this->once())
|
|
|
->method('_parseContent')
|
|
|
- ->with('posts/index', $View->output)
|
|
|
+ ->with('posts/index', 'content')
|
|
|
->will($this->returnValue(''));
|
|
|
|
|
|
- $Cache->afterRender('posts/index');
|
|
|
+ $Cache->afterRenderFile('posts/index', 'content');
|
|
|
|
|
|
Configure::write('Cache.check', false);
|
|
|
$Cache->afterRender('posts/index');
|