added extra tests for changed view file extension

This commit is contained in:
Ceeram 2011-03-25 11:57:25 +01:00 committed by mark_story
parent 0bab8f8e14
commit d0e574cbba
2 changed files with 27 additions and 0 deletions

View file

@ -947,4 +947,30 @@ class ViewTest extends CakeTestCase {
$View->render('this_is_missing');
$result = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
}
/**
* testAltExt method
*
* @access public
* @return void
*/
function testAltExt() {
$this->PostsController->ext = '.alt';
$View = new TestView($this->PostsController);
$result = $View->render('alt_ext', false);
$this->assertEqual($result, 'alt ext');
}
/**
* testAltBadExt method
*
* @expectedException MissingViewException
* @access public
* @return void
*/
function testAltBadExt() {
$View = new TestView($this->PostsController);
$View->render('alt_ext');
$result = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
}
}

View file

@ -0,0 +1 @@
alt ext