mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
closes #4000, added test case to show ext functionality is working as expected
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7248 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
91d86b91a4
commit
73eab59ada
1 changed files with 68 additions and 49 deletions
|
@ -698,5 +698,24 @@ class ControllerTest extends CakeTestCase {
|
|||
$result = $Controller->postConditions($data, $ops);
|
||||
$this->assertIdentical($result, $expected);
|
||||
}
|
||||
/**
|
||||
* testRequestHandlerPrefers method
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function testRequestHandlerPrefers(){
|
||||
$Controller =& new Controller();
|
||||
$Controller->components = array("RequestHandler");
|
||||
$Controller->modelClass='ControllerPost';
|
||||
$Controller->params['url']['ext'] = 'rss';
|
||||
$Controller->constructClasses();
|
||||
$Controller->Component->initialize($Controller);
|
||||
$Controller->beforeFilter();
|
||||
$Controller->Component->startup($Controller);
|
||||
|
||||
$this->assertEqual($Controller->RequestHandler->prefers(), 'rss');
|
||||
unset($Controller);
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue