Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoiding class name conflicts
  • Loading branch information
lorenzo committed Jan 22, 2012
1 parent 5cc2860 commit 9d0a67d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/Cake/Test/Case/View/ThemeViewTest.php
Expand Up @@ -22,11 +22,11 @@


/**
* ThemePostsController class
* ThemePosts2Controller class
*
* @package Cake.Test.Case.View
*/
class ThemePostsController extends Controller {
class ThemePosts2Controller extends Controller {

/**
* name property
Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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');
Expand Down Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit 9d0a67d

Please sign in to comment.