mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-17 15:09:50 +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() {
|
function startTest() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
|
'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';
|
$this->Controller->action = 'index';
|
||||||
|
|
||||||
$View = new TestView($this->Controller);
|
$View = new TestView($this->Controller);
|
||||||
Configure::write('pluginPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS));
|
App::build(array(
|
||||||
Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS));
|
'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';
|
$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');
|
$result = $View->getViewFileName('index');
|
||||||
|
|
Loading…
Add table
Reference in a new issue