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:
gwoo 2008-06-23 20:09:24 +00:00
parent 91d86b91a4
commit 73eab59ada

View file

@ -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);
}
}
?>