Permalink
Browse files

Updating View test case to work with updated API's

  • Loading branch information...
1 parent b2f7cd5 commit e306b65908f7d119bdc0c629da46fae709f7b79e @markstory markstory committed Aug 14, 2009
Showing with 9 additions and 4 deletions.
  1. +9 −4 cake/tests/cases/libs/view/view.test.php
@@ -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);
}
/**
@@ -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');

0 comments on commit e306b65

Please sign in to comment.