mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
4389da119d
commit
11b48f865d
1 changed files with 21 additions and 0 deletions
|
@ -992,6 +992,27 @@ class DispatcherTest extends UnitTestCase {
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
$filename = CACHE . 'views' . DS . Inflector::slug($dispatcher->here) . '.php';
|
$filename = CACHE . 'views' . DS . Inflector::slug($dispatcher->here) . '.php';
|
||||||
unlink($filename);
|
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() {
|
function testHttpMethodOverrides() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue