mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Updating View test case to work with updated API's
This commit is contained in:
parent
b2f7cd5aff
commit
e306b65908
1 changed files with 9 additions and 4 deletions
|
@ -254,8 +254,11 @@ class ViewTest extends CakeTestCase {
|
|||
function startTest() {
|
||||
App::build(array(
|
||||
'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
|
||||
'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,
|
||||
TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS
|
||||
)
|
||||
), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -303,8 +306,10 @@ class ViewTest extends CakeTestCase {
|
|||
$this->Controller->action = 'index';
|
||||
|
||||
$View = new TestView($this->Controller);
|
||||
Configure::write('pluginPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS));
|
||||
Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS));
|
||||
App::build(array(
|
||||
'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
|
||||
'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)
|
||||
));
|
||||
|
||||
$expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS .'tests' . DS .'index.ctp';
|
||||
$result = $View->getViewFileName('index');
|
||||
|
|
Loading…
Add table
Reference in a new issue