Fixing + adding imports for Scaffold.

This commit is contained in:
mark_story 2010-09-08 00:11:37 -04:00
parent 58d62cb369
commit 5d703c4f50
3 changed files with 5 additions and 5 deletions

View file

@ -462,9 +462,7 @@ class Scaffold {
* @package cake * @package cake
* @subpackage cake.cake.libs.controller * @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. * ScaffoldView provides specific view file loading features for scaffolded views.

View file

@ -17,6 +17,7 @@
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::import('View', 'View');
/** /**
* Theme view class * Theme view class

View file

@ -17,7 +17,8 @@
* @since CakePHP(tm) v 1.2.0.5436 * @since CakePHP(tm) v 1.2.0.5436
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License * @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 * ScaffoldMockController class
@ -789,7 +790,7 @@ class ScaffoldTest extends CakeTestCase {
$this->Controller->theme = 'test_theme'; $this->Controller->theme = 'test_theme';
$this->Controller->view = 'Theme'; $this->Controller->view = 'Theme';
$this->Controller->constructClasses(); $this->Controller->constructClasses();
$Scaffold =& new TestScaffoldMock($this->Controller, array()); $Scaffold =& new TestScaffoldMock($this->Controller, $this->Controller->request);
$this->assertEqual($this->Controller->view, 'Scaffold'); $this->assertEqual($this->Controller->view, 'Scaffold');
} }