mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing failing test in ControllerTest caused by ThemeView not being correctly found if it was not in the mapped files.
This commit is contained in:
parent
41997b06e1
commit
a78bb20bda
1 changed files with 6 additions and 2 deletions
|
@ -910,8 +910,12 @@ class ControllerTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
function testComponentBeforeRenderChangingViewClass() {
|
||||
$core = App::core('views');
|
||||
App::build(array(
|
||||
'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)
|
||||
'views' => array(
|
||||
TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS,
|
||||
$core[0]
|
||||
)
|
||||
), true);
|
||||
$Controller =& new Controller();
|
||||
$Controller->uses = array();
|
||||
|
@ -921,7 +925,7 @@ class ControllerTest extends CakeTestCase {
|
|||
$Controller->viewPath = 'posts';
|
||||
$Controller->theme = 'test_theme';
|
||||
$result = $Controller->render('index');
|
||||
$this->assertPattern('/posts index themed view/', $result);
|
||||
$this->assertPattern('/default test_theme layout/', $result);
|
||||
App::build();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue