Skip to content

Commit

Permalink
Updating View test case to work with updated API's
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 14, 2009
1 parent b2f7cd5 commit e306b65
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cake/tests/cases/libs/view/view.test.php
Expand Up @@ -254,8 +254,11 @@ function tearDown() {
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);
}

/**
Expand Down Expand Up @@ -303,8 +306,10 @@ function testCamelCasePluginGetTemplate() {
$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');
Expand Down

0 comments on commit e306b65

Please sign in to comment.