Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoiding class name conflicts

  • Loading branch information...
commit 9d0a67ddecd4bec10260cf753543f09048d796e2 1 parent 5cc2860
@lorenzo lorenzo authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/Cake/Test/Case/View/ThemeViewTest.php
View
18 lib/Cake/Test/Case/View/ThemeViewTest.php
@@ -22,11 +22,11 @@
/**
- * ThemePostsController class
+ * ThemePosts2Controller class
*
* @package Cake.Test.Case.View
*/
-class ThemePostsController extends Controller {
+class ThemePosts2Controller extends Controller {
/**
* name property
@@ -51,11 +51,11 @@ public function index() {
}
/**
- * TestThemeView class
+ * TestTheme2View class
*
* @package Cake.Test.Case.View
*/
-class TestThemeView extends ThemeView {
+class TestTheme2View extends ThemeView {
/**
* renderElement method
@@ -106,7 +106,7 @@ public function setUp() {
parent::setUp();
$request = new CakeRequest('posts/index');
$this->Controller = new Controller($request);
- $this->PostsController = new ThemePostsController($request);
+ $this->PostsController = new ThemePosts2Controller($request);
$this->PostsController->viewPath = 'posts';
$this->PostsController->index();
$this->ThemeView = new ThemeView($this->PostsController);
@@ -143,7 +143,7 @@ public function testPluginThemedGetTemplate() {
$this->Controller->action = 'index';
$this->Controller->theme = 'TestTheme';
- $ThemeView = new TestThemeView($this->Controller);
+ $ThemeView = new TestTheme2View($this->Controller);
$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Tests' . DS .'index.ctp';
$result = $ThemeView->getViewFileName('index');
$this->assertEquals($expected, $result);
@@ -169,7 +169,7 @@ public function testGetTemplate() {
$this->Controller->action = 'display';
$this->Controller->params['pass'] = array('home');
- $ThemeView = new TestThemeView($this->Controller);
+ $ThemeView = new TestTheme2View($this->Controller);
$ThemeView->theme = 'TestTheme';
$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp';
$result = $ThemeView->getViewFileName('home');
@@ -209,7 +209,7 @@ public function testMissingView() {
$this->Controller->params['pass'] = array('home');
- $View = new TestThemeView($this->Controller);
+ $View = new TestTheme2View($this->Controller);
ob_start();
$result = $View->getViewFileName('does_not_exist');
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
@@ -230,7 +230,7 @@ public function testMissingLayout() {
$this->Controller->layout = 'whatever';
$this->Controller->theme = 'my_theme';
- $View = new TestThemeView($this->Controller);
+ $View = new TestTheme2View($this->Controller);
ob_start();
$result = $View->getLayoutFileName();
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
Please sign in to comment.
Something went wrong with that request. Please try again.