diff --git a/cake/tests/cases/libs/view/view.test.php b/cake/tests/cases/libs/view/view.test.php index 74058c3db..3ccd8cce5 100644 --- a/cake/tests/cases/libs/view/view.test.php +++ b/cake/tests/cases/libs/view/view.test.php @@ -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()); + } } diff --git a/cake/tests/test_app/views/posts/alt_ext.alt b/cake/tests/test_app/views/posts/alt_ext.alt new file mode 100644 index 000000000..5d26c812f --- /dev/null +++ b/cake/tests/test_app/views/posts/alt_ext.alt @@ -0,0 +1 @@ +alt ext \ No newline at end of file