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:
gwoo 2008-05-01 05:55:48 +00:00
parent 7ab5c20577
commit 6b4fe0a1a2

View file

@ -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() {