Skip to content

Commit

Permalink
Fixing + adding imports for Scaffold.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 8, 2010
1 parent 58d62cb commit 5d703c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions cake/libs/controller/scaffold.php
Expand Up @@ -462,9 +462,7 @@ protected function _associations() {
* @package cake
* @subpackage cake.cake.libs.controller
*/
if (!class_exists('ThemeView')) {
App::import('View', 'Theme');
}
App::import('View', 'Theme');

/**
* ScaffoldView provides specific view file loading features for scaffolded views.
Expand Down
1 change: 1 addition & 0 deletions cake/libs/view/theme.php
Expand Up @@ -17,6 +17,7 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('View', 'View');

/**
* Theme view class
Expand Down
5 changes: 3 additions & 2 deletions cake/tests/cases/libs/controller/scaffold.test.php
Expand Up @@ -17,7 +17,8 @@
* @since CakePHP(tm) v 1.2.0.5436
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
App::import('Core', 'Scaffold');
App::import('Core', 'Scaffold', false);
App::import('Core', 'Controller', false);

/**
* ScaffoldMockController class
Expand Down Expand Up @@ -789,7 +790,7 @@ function testScaffoldChangingViewProperty() {
$this->Controller->theme = 'test_theme';
$this->Controller->view = 'Theme';
$this->Controller->constructClasses();
$Scaffold =& new TestScaffoldMock($this->Controller, array());
$Scaffold =& new TestScaffoldMock($this->Controller, $this->Controller->request);

$this->assertEqual($this->Controller->view, 'Scaffold');
}
Expand Down

0 comments on commit 5d703c4

Please sign in to comment.