mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Adding test to dispatcher.test.php showing paths with named params. Tested on windows XP with apache 2.x and php 5.x Disproves #5445.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7618 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e3d7aee9da
commit
f65de0b28d
1 changed files with 19 additions and 0 deletions
|
@ -1640,6 +1640,25 @@ class DispatcherTest extends CakeTestCase {
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
$filename = $this->__cachePath($dispatcher->here);
|
$filename = $this->__cachePath($dispatcher->here);
|
||||||
unlink($filename);
|
unlink($filename);
|
||||||
|
|
||||||
|
$url = 'test_cached_pages/view/foo:bar/value:goo';
|
||||||
|
|
||||||
|
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 = $this->__cachePath($dispatcher->here);
|
||||||
|
$this->assertTrue(file_exists($filename));
|
||||||
|
unlink($filename);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testHttpMethodOverrides method
|
* testHttpMethodOverrides method
|
||||||
|
|
Loading…
Add table
Reference in a new issue