adding dispatcher test for cached pages with camel cased names, closes #4086

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6545 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-03-09 22:39:29 +00:00
parent 4389da119d
commit 11b48f865d

View file

@ -992,6 +992,27 @@ class DispatcherTest extends UnitTestCase {
$this->assertEqual($result, $expected);
$filename = CACHE . 'views' . DS . Inflector::slug($dispatcher->here) . '.php';
unlink($filename);
$url = 'TestCachedPages/index';
restore_error_handler();
ob_start();
$dispatcher->dispatch($url);
$out = ob_get_clean();
ob_start();
$dispatcher->cached($url);
$cached = ob_get_clean();
set_error_handler('simpleTestErrorHandler');
$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() {