Skip to content
Permalink
Browse files

Removing assignment of reference to theme view.

Removing cruft in ThemeView test.
  • Loading branch information...
markstory committed Sep 15, 2010
1 parent f34cfd1 commit c255539980c0f5be4bff3f70f5e939dbd167536c
Showing with 6 additions and 40 deletions.
  1. +1 −1 cake/libs/view/theme.php
  2. +5 −39 cake/tests/cases/libs/view/theme.test.php
@@ -40,7 +40,7 @@ class ThemeView extends View {
*/
function __construct(&$controller) {
parent::__construct($controller);
$this->theme =& $controller->theme;
$this->theme = $controller->theme;
}
/**
@@ -21,12 +21,6 @@
App::import('View', 'Theme');
App::import('Core', 'Controller');
if (!class_exists('ErrorHandler')) {
App::import('Core', array('Error'));
}
if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) {
define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
}
/**
* ThemePostsController class
@@ -43,6 +37,8 @@ class ThemePostsController extends Controller {
* @access public
*/
public $name = 'ThemePosts';
public $theme = null;
/**
* index method
@@ -58,25 +54,6 @@ function index() {
}
}
/**
* ThemeViewTestErrorHandler class
*
* @package cake
* @subpackage cake.tests.cases.libs.view
*/
class ThemeViewTestErrorHandler extends ErrorHandler {
/**
* stop method
*
* @access public
* @return void
*/
function _stop() {
return;
}
}
/**
* TestThemeView class
*
@@ -119,18 +96,6 @@ function getLayoutFileName($name = null) {
return $this->_getLayoutFileName($name);
}
/**
* cakeError method
*
* @param mixed $method
* @param mixed $messages
* @access public
* @return void
*/
function cakeError($method, $messages) {
$error = new ThemeViewTestErrorHandler($method, $messages);
return $error;
}
}
/**
@@ -149,8 +114,9 @@ class ThemeViewTest extends CakeTestCase {
*/
function setUp() {
Router::reload();
$this->Controller = new Controller();
$this->PostsController = new ThemePostsController();
$request = new CakeRequest('posts/index');
$this->Controller = new Controller($request);
$this->PostsController = new ThemePostsController($request);
$this->PostsController->viewPath = 'posts';
$this->PostsController->index();
$this->ThemeView = new ThemeView($this->PostsController);

0 comments on commit c255539

Please sign in to comment.
You can’t perform that action at this time.