diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index c377ba9c0..731732a3c 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -307,58 +307,58 @@ class ScaffoldViewTest extends CakeTestCase { $this->Controller->request->params['action'] = 'index'; $ScaffoldView = new TestScaffoldView($this->Controller); $result = $ScaffoldView->testGetFilename('index'); - $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'index.ctp'; - $this->assertEqual($result, $expected); + $expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'index.ctp'; + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('edit'); - $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; - $this->assertEqual($result, $expected); + $expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'form.ctp'; + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('add'); - $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; - $this->assertEqual($result, $expected); + $expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'form.ctp'; + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('view'); - $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'view.ctp'; - $this->assertEqual($result, $expected); + $expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'view.ctp'; + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('admin_index'); - $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'index.ctp'; - $this->assertEqual($result, $expected); + $expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'index.ctp'; + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('admin_view'); - $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'view.ctp'; - $this->assertEqual($result, $expected); + $expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'view.ctp'; + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('admin_edit'); - $expected =CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; - $this->assertEqual($result, $expected); + $expected =CAKE . 'View' . DS . 'Scaffolds' . DS . 'form.ctp'; + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('admin_add'); - $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; - $this->assertEqual($result, $expected); + $expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'form.ctp'; + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('error'); - $expected = CAKE . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp'; - $this->assertEqual($result, $expected); + $expected = CAKE . 'View' . DS . 'Errors' . DS . 'scaffold_error.ctp'; + $this->assertEqual($expected, $result); $Controller = new ScaffoldMockController($this->request); $Controller->scaffold = 'admin'; - $Controller->viewPath = 'posts'; + $Controller->viewPath = 'Posts'; $Controller->request['action'] = 'admin_edit'; $ScaffoldView = new TestScaffoldView($Controller); $result = $ScaffoldView->testGetFilename('admin_edit'); $expected = CAKE . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('edit'); $expected = CAKE . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Controller = new ScaffoldMockController($this->request); $Controller->scaffold = 'admin'; - $Controller->viewPath = 'tests'; + $Controller->viewPath = 'Tests'; $Controller->request->addParams(array( 'plugin' => 'test_plugin', 'action' => 'admin_add', @@ -370,12 +370,12 @@ class ScaffoldViewTest extends CakeTestCase { $result = $ScaffoldView->testGetFilename('admin_add'); $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS .'test_plugin' . DS . 'View' . DS . 'tests' . DS . 'scaffold.form.ctp'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $ScaffoldView->testGetFilename('add'); $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS .'test_plugin' . DS . 'View' . DS . 'tests' . DS . 'scaffold.form.ctp'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('Routing.prefixes', $_admin); } @@ -387,14 +387,14 @@ class ScaffoldViewTest extends CakeTestCase { */ function testGetViewFileNameWithTheme() { $this->Controller->request['action'] = 'index'; - $this->Controller->viewPath = 'posts'; + $this->Controller->viewPath = 'Posts'; $this->Controller->theme = 'test_theme'; $ScaffoldView = new TestScaffoldView($this->Controller); $result = $ScaffoldView->testGetFilename('index'); $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS - . 'themed' . DS . 'test_theme' . DS . 'posts' . DS . 'scaffold.index.ctp'; - $this->assertEqual($result, $expected); + . 'Themed' . DS . 'test_theme' . DS . 'Posts' . DS . 'scaffold.index.ctp'; + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/View/ScaffoldView.php b/lib/Cake/View/ScaffoldView.php index 6a82133dc..11b9892c7 100644 --- a/lib/Cake/View/ScaffoldView.php +++ b/lib/Cake/View/ScaffoldView.php @@ -62,7 +62,7 @@ class ScaffoldView extends ThemeView { } $names[] = $this->viewPath . DS . $subDir . $scaffoldAction; - $names[] = 'scaffolds' . DS . $subDir . $name; + $names[] = 'Scaffolds' . DS . $subDir . $name; $paths = $this->_paths($this->plugin); $exts = array($this->ext); @@ -79,7 +79,7 @@ class ScaffoldView extends ThemeView { } } - if ($name === 'scaffolds' . DS . $subDir . 'error') { + if ($name === 'Scaffolds' . DS . $subDir . 'error') { return CAKE . 'View' . DS . 'Errors' . DS . 'scaffold_error.ctp'; }