mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
adding dispatcher test for full page caching, closes #4515
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6742 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
7ab5c20577
commit
6b4fe0a1a2
1 changed files with 18 additions and 0 deletions
|
@ -953,6 +953,24 @@ class DispatcherTest extends UnitTestCase {
|
|||
$this->assertEqual($result, $expected);
|
||||
$filename = CACHE . 'views' . DS . Inflector::slug($dispatcher->here) . '.php';
|
||||
unlink($filename);
|
||||
|
||||
$url = 'TestCachedPages/test_nocache_tags';
|
||||
|
||||
ob_start();
|
||||
$dispatcher->dispatch($url);
|
||||
$out = ob_get_clean();
|
||||
|
||||
ob_start();
|
||||
$dispatcher->cached($url);
|
||||
$cached = ob_get_clean();
|
||||
|
||||
$result = str_replace(array("\t", "\r\n", "\n"), "", $out);
|
||||
$cached = preg_replace('/<!--+[^<>]+-->/', '', $cached);
|
||||
$expected = str_replace(array("\t", "\r\n", "\n"), "", $cached);
|
||||
|
||||
$this->assertEqual($result, $expected);
|
||||
$filename = CACHE . 'views' . DS . Inflector::slug($dispatcher->here) . '.php';
|
||||
unlink($filename);
|
||||
}
|
||||
|
||||
function testHttpMethodOverrides() {
|
||||
|
|
Loading…
Reference in a new issue