Browse Source

Moved view files under "Template" folder.

ADmad 12 years ago
parent
commit
dc68840ed2
100 changed files with 55 additions and 55 deletions
  1. 6 6
      src/Core/App.php
  2. 0 0
      src/Template/Element/exception_stack_trace.ctp
  3. 0 0
      src/Template/Element/sql_dump.ctp
  4. 0 0
      src/Template/Error/fatal_error.ctp
  5. 0 0
      src/Template/Error/missing_action.ctp
  6. 0 0
      src/Template/Error/missing_behavior.ctp
  7. 0 0
      src/Template/Error/missing_component.ctp
  8. 0 0
      src/Template/Error/missing_connection.ctp
  9. 0 0
      src/Template/Error/missing_controller.ctp
  10. 0 0
      src/Template/Error/missing_database.ctp
  11. 0 0
      src/Template/Error/missing_datasource.ctp
  12. 0 0
      src/Template/Error/missing_datasource_config.ctp
  13. 0 0
      src/Template/Error/missing_helper.ctp
  14. 0 0
      src/Template/Error/missing_layout.ctp
  15. 0 0
      src/Template/Error/missing_plugin.ctp
  16. 0 0
      src/Template/Error/missing_table.ctp
  17. 0 0
      src/Template/Error/missing_view.ctp
  18. 0 0
      src/Template/Error/pdo_error.ctp
  19. 0 0
      src/Template/Error/private_action.ctp
  20. 0 0
      src/Template/Error/scaffold_error.ctp
  21. 5 5
      src/View/View.php
  22. 5 5
      tests/TestCase/Console/Command/Task/ExtractTaskTest.php
  23. 2 2
      tests/TestCase/Core/AppTest.php
  24. 7 7
      tests/TestCase/Routing/DispatcherTest.php
  25. 1 1
      tests/TestCase/View/HelperTest.php
  26. 28 28
      tests/TestCase/View/ViewTest.php
  27. 1 1
      tests/init.php
  28. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Element/plugin_element.ctp
  29. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Element/sub_dir/sub_element.ctp
  30. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Element/test_plugin_element.ctp
  31. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Element/translate.ctp
  32. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Email/text/test_plugin_tpl.ctp
  33. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Layout/Email/text/plug_default.ctp
  34. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Layout/default.ctp
  35. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Tests/index.ctp
  36. 0 0
      tests/test_app/Plugin/TestPlugin/Template/Tests/scaffold.form.ctp
  37. 0 0
      tests/test_app/TestApp/Template/Element/extended_element.ctp
  38. 0 0
      tests/test_app/TestApp/Template/Element/extended_missing_element.ctp
  39. 0 0
      tests/test_app/TestApp/Template/Element/html_call.ctp
  40. 0 0
      tests/test_app/TestApp/Template/Element/nocache/contains_nocache.ctp
  41. 0 0
      tests/test_app/TestApp/Template/Element/nocache/plain.ctp
  42. 0 0
      tests/test_app/TestApp/Template/Element/nocache/sub1.ctp
  43. 0 0
      tests/test_app/TestApp/Template/Element/nocache/sub2.ctp
  44. 0 0
      tests/test_app/TestApp/Template/Element/parent_element.ctp
  45. 0 0
      tests/test_app/TestApp/Template/Element/session_helper.ctp
  46. 0 0
      tests/test_app/TestApp/Template/Element/test_element.ctp
  47. 0 0
      tests/test_app/TestApp/Template/Element/test_element.xml
  48. 0 0
      tests/test_app/TestApp/Template/Element/type_check.ctp
  49. 0 0
      tests/test_app/TestApp/Template/Email/html/custom.ctp
  50. 0 0
      tests/test_app/TestApp/Template/Email/html/default.ctp
  51. 0 0
      tests/test_app/TestApp/Template/Email/html/html.ctp
  52. 0 0
      tests/test_app/TestApp/Template/Email/html/image.ctp
  53. 0 0
      tests/test_app/TestApp/Template/Email/html/japanese.ctp
  54. 0 0
      tests/test_app/TestApp/Template/Email/html/nested_element.ctp
  55. 0 0
      tests/test_app/TestApp/Template/Email/text/custom.ctp
  56. 0 0
      tests/test_app/TestApp/Template/Email/text/custom_helper.ctp
  57. 0 0
      tests/test_app/TestApp/Template/Email/text/default.ctp
  58. 0 0
      tests/test_app/TestApp/Template/Email/text/japanese.ctp
  59. 0 0
      tests/test_app/TestApp/Template/Email/text/wide.ctp
  60. 0 0
      tests/test_app/TestApp/Template/Error/empty
  61. 0 0
      tests/test_app/TestApp/Template/Error/error400.ctp
  62. 0 0
      tests/test_app/TestApp/Template/Error/error500.ctp
  63. 0 0
      tests/test_app/TestApp/Template/Layout/Email/html/default.ctp
  64. 0 0
      tests/test_app/TestApp/Template/Layout/Email/html/japanese.ctp
  65. 0 0
      tests/test_app/TestApp/Template/Layout/Email/html/thin.ctp
  66. 0 0
      tests/test_app/TestApp/Template/Layout/Email/text/default.ctp
  67. 0 0
      tests/test_app/TestApp/Template/Layout/Email/text/japanese.ctp
  68. 0 0
      tests/test_app/TestApp/Template/Layout/ajax.ctp
  69. 0 0
      tests/test_app/TestApp/Template/Layout/ajax2.ctp
  70. 0 0
      tests/test_app/TestApp/Template/Layout/banana.ctp
  71. 0 0
      tests/test_app/TestApp/Template/Layout/cache_empty_sections.ctp
  72. 0 0
      tests/test_app/TestApp/Template/Layout/cache_layout.ctp
  73. 0 0
      tests/test_app/TestApp/Template/Layout/default.ctp
  74. 0 0
      tests/test_app/TestApp/Template/Layout/error.ctp
  75. 0 0
      tests/test_app/TestApp/Template/Layout/js/default.ctp
  76. 0 0
      tests/test_app/TestApp/Template/Layout/json/default.ctp
  77. 0 0
      tests/test_app/TestApp/Template/Layout/multi_cache.ctp
  78. 0 0
      tests/test_app/TestApp/Template/Layout/rss/default.ctp
  79. 0 0
      tests/test_app/TestApp/Template/Layout/xml/default.ctp
  80. 0 0
      tests/test_app/TestApp/Template/Pages/extract.ctp
  81. 0 0
      tests/test_app/TestApp/Template/Pages/home.ctp
  82. 0 0
      tests/test_app/TestApp/Template/Pages/page.home.ctp
  83. 0 0
      tests/test_app/TestApp/Template/Posts/alt_ext.alt
  84. 0 0
      tests/test_app/TestApp/Template/Posts/cache_empty_sections.ctp
  85. 0 0
      tests/test_app/TestApp/Template/Posts/cache_form.ctp
  86. 0 0
      tests/test_app/TestApp/Template/Posts/extend_element.ctp
  87. 0 0
      tests/test_app/TestApp/Template/Posts/extend_loop.ctp
  88. 0 0
      tests/test_app/TestApp/Template/Posts/extend_loop_inner.ctp
  89. 0 0
      tests/test_app/TestApp/Template/Posts/extend_missing_element.ctp
  90. 0 0
      tests/test_app/TestApp/Template/Posts/extend_self.ctp
  91. 0 0
      tests/test_app/TestApp/Template/Posts/extend_with_element.ctp
  92. 0 0
      tests/test_app/TestApp/Template/Posts/helper_overwrite.ctp
  93. 0 0
      tests/test_app/TestApp/Template/Posts/index.ctp
  94. 0 0
      tests/test_app/TestApp/Template/Posts/json/index.ctp
  95. 0 0
      tests/test_app/TestApp/Template/Posts/multiple_nocache.ctp
  96. 0 0
      tests/test_app/TestApp/Template/Posts/nested_extends.ctp
  97. 0 0
      tests/test_app/TestApp/Template/Posts/nocache_multiple_element.ctp
  98. 0 0
      tests/test_app/TestApp/Template/Posts/open_block.ctp
  99. 0 0
      tests/test_app/TestApp/Template/Posts/parent_1.ctp
  100. 0 0
      tests/test_app/TestApp/View/Posts/parent_2.ctp

+ 6 - 6
src/Core/App.php

@@ -25,9 +25,9 @@ use Cake\Utility\Inflector;
  *
  * ### Adding paths
  *
- * Additional paths for Views and Plugins are configured with Configure now. See App/Config/app.php for an
- * example. The `App.paths.plugins` and `App.paths.views` variables are used to configure paths for plugins
- * and views respectively. All class based resources should be mapped using your application's autoloader.
+ * Additional paths for Templates and Plugins are configured with Configure now. See App/Config/app.php for an
+ * example. The `App.paths.plugins` and `App.paths.templates` variables are used to configure paths for plugins
+ * and templates respectively. All class based resources should be mapped using your application's autoloader.
  *
  * ### Inspecting loaded paths
  *
@@ -139,8 +139,8 @@ class App {
 		if ($type === 'Plugin') {
 			return (array)Configure::read('App.paths.plugins');
 		}
-		if (empty($plugin) && $type === 'View') {
-			return (array)Configure::read('App.paths.views');
+		if (empty($plugin) && $type === 'Template') {
+			return (array)Configure::read('App.paths.templates');
 		}
 		if (!empty($plugin)) {
 			return [static::pluginPath($plugin) . $type . DS];
@@ -178,7 +178,7 @@ class App {
  */
 	public static function themePath($theme) {
 		$themeDir = 'Themed' . DS . Inflector::camelize($theme);
-		$paths = static::path('View');
+		$paths = static::path('Template');
 		foreach ($paths as $path) {
 			if (is_dir($path . $themeDir)) {
 				return $path . $themeDir . DS;

src/View/Element/exception_stack_trace.ctp → src/Template/Element/exception_stack_trace.ctp


src/View/Element/sql_dump.ctp → src/Template/Element/sql_dump.ctp


src/View/Error/fatal_error.ctp → src/Template/Error/fatal_error.ctp


src/View/Error/missing_action.ctp → src/Template/Error/missing_action.ctp


src/View/Error/missing_behavior.ctp → src/Template/Error/missing_behavior.ctp


src/View/Error/missing_component.ctp → src/Template/Error/missing_component.ctp


src/View/Error/missing_connection.ctp → src/Template/Error/missing_connection.ctp


src/View/Error/missing_controller.ctp → src/Template/Error/missing_controller.ctp


src/View/Error/missing_database.ctp → src/Template/Error/missing_database.ctp


src/View/Error/missing_datasource.ctp → src/Template/Error/missing_datasource.ctp


src/View/Error/missing_datasource_config.ctp → src/Template/Error/missing_datasource_config.ctp


src/View/Error/missing_helper.ctp → src/Template/Error/missing_helper.ctp


src/View/Error/missing_layout.ctp → src/Template/Error/missing_layout.ctp


src/View/Error/missing_plugin.ctp → src/Template/Error/missing_plugin.ctp


src/View/Error/missing_table.ctp → src/Template/Error/missing_table.ctp


src/View/Error/missing_view.ctp → src/Template/Error/missing_view.ctp


src/View/Error/pdo_error.ctp → src/Template/Error/pdo_error.ctp


src/View/Error/private_action.ctp → src/Template/Error/private_action.ctp


src/View/Error/scaffold_error.ctp → src/Template/Error/scaffold_error.ctp


+ 5 - 5
src/View/View.php

@@ -369,7 +369,7 @@ class View extends Object {
  * This realizes the concept of Elements, (or "partial layouts") and the $params array is used to send
  * data to be used in the element. Elements can be cached improving performance by using the `cache` option.
  *
- * @param string $name Name of template file in the/app/View/Element/ folder,
+ * @param string $name Name of template file in the/app/Template/Element/ folder,
  *   or `MyPlugin.template` to use the template element from MyPlugin. If the element
  *   is not found in the plugin, the normal view path cascade will be searched.
  * @param array $data Array of data to be made available to the rendered view (i.e. the Element)
@@ -413,7 +413,7 @@ class View extends Object {
 /**
  * Checks if an element exists
  *
- * @param string $name Name of template file in the /app/View/Element/ folder,
+ * @param string $name Name of template file in the /app/Template/Element/ folder,
  *   or `MyPlugin.template` to check the template element from MyPlugin. If the element
  *   is not found in the plugin, the normal view path cascade will be searched.
  * @return boolean Success
@@ -1038,8 +1038,8 @@ class View extends Object {
 			return $this->_paths;
 		}
 		$paths = array();
-		$viewPaths = App::path('View');
-		$corePaths = App::core('View');
+		$viewPaths = App::path('Template');
+		$corePaths = App::core('Template');
 
 		if (!empty($plugin)) {
 			$count = count($viewPaths);
@@ -1048,7 +1048,7 @@ class View extends Object {
 					$paths[] = $viewPaths[$i] . 'Plugin' . DS . $plugin . DS;
 				}
 			}
-			$paths = array_merge($paths, App::path('View', $plugin));
+			$paths = array_merge($paths, App::path('Template', $plugin));
 		}
 
 		$paths = array_unique(array_merge($paths, $viewPaths));

+ 5 - 5
tests/TestCase/Console/Command/Task/ExtractTaskTest.php

@@ -72,7 +72,7 @@ class ExtractTaskTest extends TestCase {
 	public function testExecute() {
 		$this->Task->interactive = false;
 
-		$this->Task->params['paths'] = TEST_APP . 'TestApp/View/Pages';
+		$this->Task->params['paths'] = TEST_APP . 'TestApp/Template/Pages';
 		$this->Task->params['output'] = $this->path . DS;
 		$this->Task->params['extract-core'] = 'no';
 		$this->Task->expects($this->never())->method('err');
@@ -131,7 +131,7 @@ class ExtractTaskTest extends TestCase {
 	public function testExtractCategory() {
 		$this->Task->interactive = false;
 
-		$this->Task->params['paths'] = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Pages';
+		$this->Task->params['paths'] = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Pages';
 		$this->Task->params['output'] = $this->path . DS;
 		$this->Task->params['extract-core'] = 'no';
 		$this->Task->params['merge'] = 'no';
@@ -156,7 +156,7 @@ class ExtractTaskTest extends TestCase {
 	public function testExtractWithExclude() {
 		$this->Task->interactive = false;
 
-		$this->Task->params['paths'] = TEST_APP . 'TestApp/View';
+		$this->Task->params['paths'] = TEST_APP . 'TestApp/Template';
 		$this->Task->params['output'] = $this->path . DS;
 		$this->Task->params['exclude'] = 'Pages,Layout';
 		$this->Task->params['extract-core'] = 'no';
@@ -184,8 +184,8 @@ class ExtractTaskTest extends TestCase {
 		$this->Task->interactive = false;
 
 		$this->Task->params['paths'] =
-			TEST_APP . 'TestApp/View/Pages,' .
-			TEST_APP . 'TestApp/View/Posts';
+			TEST_APP . 'TestApp/Template/Pages,' .
+			TEST_APP . 'TestApp/Template/Posts';
 
 		$this->Task->params['output'] = $this->path . DS;
 		$this->Task->params['extract-core'] = 'no';

+ 2 - 2
tests/TestCase/Core/AppTest.php

@@ -259,11 +259,11 @@ class AppTest extends TestCase {
  */
 	public function testThemePath() {
 		$path = App::themePath('test_theme');
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Themed' . DS . 'TestTheme' . DS;
 		$this->assertEquals($expected, $path);
 
 		$path = App::themePath('TestTheme');
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Themed' . DS . 'TestTheme' . DS;
 		$this->assertEquals($expected, $path);
 	}
 

+ 7 - 7
tests/TestCase/Routing/DispatcherTest.php

@@ -757,31 +757,31 @@ class DispatcherTest extends TestCase {
 		return array(
 			array(
 				'theme/test_theme/flash/theme_test.swf',
-				'TestApp/View/Themed/TestTheme/webroot/flash/theme_test.swf'
+				'TestApp/Template/Themed/TestTheme/webroot/flash/theme_test.swf'
 			),
 			array(
 				'theme/test_theme/pdfs/theme_test.pdf',
-				'TestApp/View/Themed/TestTheme/webroot/pdfs/theme_test.pdf'
+				'TestApp/Template/Themed/TestTheme/webroot/pdfs/theme_test.pdf'
 			),
 			array(
 				'theme/test_theme/img/test.jpg',
-				'TestApp/View/Themed/TestTheme/webroot/img/test.jpg'
+				'TestApp/Template/Themed/TestTheme/webroot/img/test.jpg'
 			),
 			array(
 				'theme/test_theme/css/test_asset.css',
-				'TestApp/View/Themed/TestTheme/webroot/css/test_asset.css'
+				'TestApp/Template/Themed/TestTheme/webroot/css/test_asset.css'
 			),
 			array(
 				'theme/test_theme/js/theme.js',
-				'TestApp/View/Themed/TestTheme/webroot/js/theme.js'
+				'TestApp/Template/Themed/TestTheme/webroot/js/theme.js'
 			),
 			array(
 				'theme/test_theme/js/one/theme_one.js',
-				'TestApp/View/Themed/TestTheme/webroot/js/one/theme_one.js'
+				'TestApp/Template/Themed/TestTheme/webroot/js/one/theme_one.js'
 			),
 			array(
 				'theme/test_theme/space%20image.text',
-				'TestApp/View/Themed/TestTheme/webroot/space image.text'
+				'TestApp/Template/Themed/TestTheme/webroot/space image.text'
 			),
 			array(
 				'test_plugin/root.js',

+ 1 - 1
tests/TestCase/View/HelperTest.php

@@ -858,7 +858,7 @@ class HelperTest extends TestCase {
 		$this->assertEquals($expected, $result);
 
 		$webRoot = Configure::read('App.www_root');
-		Configure::write('App.www_root', CAKE . 'Test/TestApp/webroot/');
+		Configure::write('App.www_root', TEST_APP . 'TestApp/webroot/');
 
 		$result = $this->Helper->webroot('/img/cake.power.gif');
 		$expected = '/theme/test_theme/img/cake.power.gif';

+ 28 - 28
tests/TestCase/View/ViewTest.php

@@ -308,25 +308,25 @@ class ViewTest extends TestCase {
 
 		$ThemeView = new TestThemeView($this->Controller);
 		$ThemeView->theme = 'TestTheme';
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Pages' . DS . 'home.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Pages' . DS . 'home.ctp';
 		$result = $ThemeView->getViewFileName('home');
 		$this->assertEquals($expected, $result);
 
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Posts' . DS . 'index.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Posts' . DS . 'index.ctp';
 		$result = $ThemeView->getViewFileName('/Posts/index');
 		$this->assertEquals($expected, $result);
 
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layout' . DS . 'default.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layout' . DS . 'default.ctp';
 		$result = $ThemeView->getLayoutFileName();
 		$this->assertEquals($expected, $result);
 
 		$ThemeView->layoutPath = 'rss';
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Layout' . DS . 'rss' . DS . 'default.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Layout' . DS . 'rss' . DS . 'default.ctp';
 		$result = $ThemeView->getLayoutFileName();
 		$this->assertEquals($expected, $result);
 
 		$ThemeView->layoutPath = 'Email' . DS . 'html';
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Layout' . DS . 'Email' . DS . 'html' . DS . 'default.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Layout' . DS . 'Email' . DS . 'html' . DS . 'default.ctp';
 		$result = $ThemeView->getLayoutFileName();
 		$this->assertEquals($expected, $result);
 	}
@@ -344,11 +344,11 @@ class ViewTest extends TestCase {
 
 		$View = new TestView($this->Controller);
 
-		$expected = Plugin::path('TestPlugin') . 'View' . DS . 'Tests' . DS . 'index.ctp';
+		$expected = Plugin::path('TestPlugin') . 'Template' . DS . 'Tests' . DS . 'index.ctp';
 		$result = $View->getViewFileName('index');
 		$this->assertEquals($expected, $result);
 
-		$expected = Plugin::path('TestPlugin') . 'View' . DS . 'Layout' . DS . 'default.ctp';
+		$expected = Plugin::path('TestPlugin') . 'Template' . DS . 'Layout' . DS . 'default.ctp';
 		$result = $View->getLayoutFileName();
 		$this->assertEquals($expected, $result);
 	}
@@ -366,7 +366,7 @@ class ViewTest extends TestCase {
 		$this->Controller->theme = 'TestTheme';
 
 		$ThemeView = new TestThemeView($this->Controller);
-		$themePath = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
+		$themePath = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Themed' . DS . 'TestTheme' . DS;
 
 		$expected = $themePath . 'Plugin' . DS . 'TestPlugin' . DS . 'Tests' . DS . 'index.ctp';
 		$result = $ThemeView->getViewFileName('index');
@@ -394,16 +394,16 @@ class ViewTest extends TestCase {
 
 		$View = new TestView($this->Controller);
 		$paths = $View->paths();
-		$expected = array_merge(App::path('View'), App::core('View'));
+		$expected = array_merge(App::path('Template'), App::core('Template'));
 		$this->assertEquals($expected, $paths);
 
 		$paths = $View->paths('TestPlugin');
 		$pluginPath = Plugin::path('TestPlugin');
 		$expected = array(
-			TEST_APP . 'TestApp' . DS . 'View' . DS . 'Plugin' . DS . 'TestPlugin' . DS,
-			$pluginPath . 'View' . DS,
-			TEST_APP . 'TestApp' . DS . 'View' . DS,
-			CAKE . 'View' . DS,
+			TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Plugin' . DS . 'TestPlugin' . DS,
+			$pluginPath . 'Template' . DS,
+			TEST_APP . 'TestApp' . DS . 'Template' . DS,
+			CAKE . 'Template' . DS,
 		);
 		$this->assertEquals($expected, $paths);
 	}
@@ -422,11 +422,11 @@ class ViewTest extends TestCase {
 		$View = new TestView($this->Controller);
 
 		$pluginPath = Plugin::path('TestPlugin');
-		$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'View' . DS . 'Tests' . DS . 'index.ctp';
+		$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'Template' . DS . 'Tests' . DS . 'index.ctp';
 		$result = $View->getViewFileName('index');
 		$this->assertEquals($expected, $result);
 
-		$expected = $pluginPath . 'View' . DS . 'Layout' . DS . 'default.ctp';
+		$expected = $pluginPath . 'Template' . DS . 'Layout' . DS . 'default.ctp';
 		$result = $View->getLayoutFileName();
 		$this->assertEquals($expected, $result);
 	}
@@ -445,29 +445,29 @@ class ViewTest extends TestCase {
 
 		$View = new TestView($this->Controller);
 
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Pages' . DS . 'home.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Pages' . DS . 'home.ctp';
 		$result = $View->getViewFileName('home');
 		$this->assertEquals($expected, $result);
 
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Posts' . DS . 'index.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Posts' . DS . 'index.ctp';
 		$result = $View->getViewFileName('/Posts/index');
 		$this->assertEquals($expected, $result);
 
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Posts' . DS . 'index.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Posts' . DS . 'index.ctp';
 		$result = $View->getViewFileName('../Posts/index');
 		$this->assertEquals($expected, $result);
 
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Pages' . DS . 'page.home.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Pages' . DS . 'page.home.ctp';
 		$result = $View->getViewFileName('page.home');
 		$this->assertEquals($expected, $result, 'Should not ruin files with dots.');
 
 		Plugin::load('TestPlugin');
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Pages' . DS . 'home.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Pages' . DS . 'home.ctp';
 		$result = $View->getViewFileName('TestPlugin.home');
 		$this->assertEquals($expected, $result, 'Plugin is missing the view, cascade to app.');
 
 		$View->viewPath = 'Tests';
-		$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'View' . DS . 'Tests' . DS . 'index.ctp';
+		$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'Template' . DS . 'Tests' . DS . 'index.ctp';
 		$result = $View->getViewFileName('TestPlugin.index');
 		$this->assertEquals($expected, $result);
 	}
@@ -485,17 +485,17 @@ class ViewTest extends TestCase {
 
 		$View = new TestView($this->Controller);
 
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Layout' . DS . 'default.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Layout' . DS . 'default.ctp';
 		$result = $View->getLayoutFileName();
 		$this->assertEquals($expected, $result);
 
 		$View->layoutPath = 'rss';
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Layout' . DS . 'rss' . DS . 'default.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Layout' . DS . 'rss' . DS . 'default.ctp';
 		$result = $View->getLayoutFileName();
 		$this->assertEquals($expected, $result);
 
 		$View->layoutPath = 'Email' . DS . 'html';
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Layout' . DS . 'Email' . DS . 'html' . DS . 'default.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Layout' . DS . 'Email' . DS . 'html' . DS . 'default.ctp';
 		$result = $View->getLayoutFileName();
 		$this->assertEquals($expected, $result);
 	}
@@ -514,12 +514,12 @@ class ViewTest extends TestCase {
 		$View = new TestView($this->Controller);
 		Plugin::load('TestPlugin');
 
-		$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'View' . DS . 'Layout' . DS . 'default.ctp';
+		$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'Template' . DS . 'Layout' . DS . 'default.ctp';
 		$result = $View->getLayoutFileName('TestPlugin.default');
 		$this->assertEquals($expected, $result);
 
 		$View->plugin = 'TestPlugin';
-		$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'View' . DS . 'Layout' . DS . 'default.ctp';
+		$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'Template' . DS . 'Layout' . DS . 'default.ctp';
 		$result = $View->getLayoutFileName('default');
 		$this->assertEquals($expected, $result);
 	}
@@ -1042,7 +1042,7 @@ class ViewTest extends TestCase {
 		$pluginPath = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS;
 
 		$result = $View->getViewFileName('sub_dir/sub_element');
-		$expected = $pluginPath . 'View' . DS . 'Element' . DS . 'sub_dir' . DS . 'sub_element.ctp';
+		$expected = $pluginPath . 'Template' . DS . 'Element' . DS . 'sub_dir' . DS . 'sub_element.ctp';
 		$this->assertEquals($expected, $result);
 	}
 
@@ -1086,7 +1086,7 @@ class ViewTest extends TestCase {
 		$result = $View->getViewFileName('../Themed/TestTheme/Posts/index');
 		$this->assertRegExp('/Themed(\/|\\\)TestTheme(\/|\\\)Posts(\/|\\\)index.ctp/', $result);
 
-		$expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Posts' . DS . 'index.ctp';
+		$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Posts' . DS . 'index.ctp';
 		$result = $View->getViewFileName('../Posts/index');
 		$this->assertEquals($expected, $result);
 	}

+ 1 - 1
tests/init.php

@@ -79,7 +79,7 @@ Configure::write('App', [
 	'cssBaseUrl' => 'css/',
 	'paths' => [
 		'plugins' => [TEST_APP . 'Plugin/'],
-		'views' => [APP . 'View/']
+		'templates' => [APP . 'Template/']
 	]
 ]);
 

tests/test_app/Plugin/TestPlugin/View/Element/plugin_element.ctp → tests/test_app/Plugin/TestPlugin/Template/Element/plugin_element.ctp


tests/test_app/Plugin/TestPlugin/View/Element/sub_dir/sub_element.ctp → tests/test_app/Plugin/TestPlugin/Template/Element/sub_dir/sub_element.ctp


tests/test_app/Plugin/TestPlugin/View/Element/test_plugin_element.ctp → tests/test_app/Plugin/TestPlugin/Template/Element/test_plugin_element.ctp


tests/test_app/Plugin/TestPlugin/View/Element/translate.ctp → tests/test_app/Plugin/TestPlugin/Template/Element/translate.ctp


tests/test_app/Plugin/TestPlugin/View/Email/text/test_plugin_tpl.ctp → tests/test_app/Plugin/TestPlugin/Template/Email/text/test_plugin_tpl.ctp


tests/test_app/Plugin/TestPlugin/View/Layout/Email/text/plug_default.ctp → tests/test_app/Plugin/TestPlugin/Template/Layout/Email/text/plug_default.ctp


tests/test_app/Plugin/TestPlugin/View/Layout/default.ctp → tests/test_app/Plugin/TestPlugin/Template/Layout/default.ctp


tests/test_app/Plugin/TestPlugin/View/Tests/index.ctp → tests/test_app/Plugin/TestPlugin/Template/Tests/index.ctp


tests/test_app/Plugin/TestPlugin/View/Tests/scaffold.form.ctp → tests/test_app/Plugin/TestPlugin/Template/Tests/scaffold.form.ctp


tests/test_app/TestApp/View/Element/extended_element.ctp → tests/test_app/TestApp/Template/Element/extended_element.ctp


tests/test_app/TestApp/View/Element/extended_missing_element.ctp → tests/test_app/TestApp/Template/Element/extended_missing_element.ctp


tests/test_app/TestApp/View/Element/html_call.ctp → tests/test_app/TestApp/Template/Element/html_call.ctp


tests/test_app/TestApp/View/Element/nocache/contains_nocache.ctp → tests/test_app/TestApp/Template/Element/nocache/contains_nocache.ctp


tests/test_app/TestApp/View/Element/nocache/plain.ctp → tests/test_app/TestApp/Template/Element/nocache/plain.ctp


tests/test_app/TestApp/View/Element/nocache/sub1.ctp → tests/test_app/TestApp/Template/Element/nocache/sub1.ctp


tests/test_app/TestApp/View/Element/nocache/sub2.ctp → tests/test_app/TestApp/Template/Element/nocache/sub2.ctp


tests/test_app/TestApp/View/Element/parent_element.ctp → tests/test_app/TestApp/Template/Element/parent_element.ctp


tests/test_app/TestApp/View/Element/session_helper.ctp → tests/test_app/TestApp/Template/Element/session_helper.ctp


tests/test_app/TestApp/View/Element/test_element.ctp → tests/test_app/TestApp/Template/Element/test_element.ctp


tests/test_app/TestApp/View/Element/test_element.xml → tests/test_app/TestApp/Template/Element/test_element.xml


tests/test_app/TestApp/View/Element/type_check.ctp → tests/test_app/TestApp/Template/Element/type_check.ctp


tests/test_app/TestApp/View/Email/html/custom.ctp → tests/test_app/TestApp/Template/Email/html/custom.ctp


tests/test_app/TestApp/View/Email/html/default.ctp → tests/test_app/TestApp/Template/Email/html/default.ctp


tests/test_app/TestApp/View/Email/html/html.ctp → tests/test_app/TestApp/Template/Email/html/html.ctp


tests/test_app/TestApp/View/Email/html/image.ctp → tests/test_app/TestApp/Template/Email/html/image.ctp


tests/test_app/TestApp/View/Email/html/japanese.ctp → tests/test_app/TestApp/Template/Email/html/japanese.ctp


tests/test_app/TestApp/View/Email/html/nested_element.ctp → tests/test_app/TestApp/Template/Email/html/nested_element.ctp


tests/test_app/TestApp/View/Email/text/custom.ctp → tests/test_app/TestApp/Template/Email/text/custom.ctp


tests/test_app/TestApp/View/Email/text/custom_helper.ctp → tests/test_app/TestApp/Template/Email/text/custom_helper.ctp


tests/test_app/TestApp/View/Email/text/default.ctp → tests/test_app/TestApp/Template/Email/text/default.ctp


tests/test_app/TestApp/View/Email/text/japanese.ctp → tests/test_app/TestApp/Template/Email/text/japanese.ctp


tests/test_app/TestApp/View/Email/text/wide.ctp → tests/test_app/TestApp/Template/Email/text/wide.ctp


tests/test_app/TestApp/View/Error/empty → tests/test_app/TestApp/Template/Error/empty


tests/test_app/TestApp/View/Error/error400.ctp → tests/test_app/TestApp/Template/Error/error400.ctp


tests/test_app/TestApp/View/Error/error500.ctp → tests/test_app/TestApp/Template/Error/error500.ctp


tests/test_app/TestApp/View/Layout/Email/html/default.ctp → tests/test_app/TestApp/Template/Layout/Email/html/default.ctp


tests/test_app/TestApp/View/Layout/Email/html/japanese.ctp → tests/test_app/TestApp/Template/Layout/Email/html/japanese.ctp


tests/test_app/TestApp/View/Layout/Email/html/thin.ctp → tests/test_app/TestApp/Template/Layout/Email/html/thin.ctp


tests/test_app/TestApp/View/Layout/Email/text/default.ctp → tests/test_app/TestApp/Template/Layout/Email/text/default.ctp


tests/test_app/TestApp/View/Layout/Email/text/japanese.ctp → tests/test_app/TestApp/Template/Layout/Email/text/japanese.ctp


tests/test_app/TestApp/View/Layout/ajax.ctp → tests/test_app/TestApp/Template/Layout/ajax.ctp


tests/test_app/TestApp/View/Layout/ajax2.ctp → tests/test_app/TestApp/Template/Layout/ajax2.ctp


tests/test_app/TestApp/View/Layout/banana.ctp → tests/test_app/TestApp/Template/Layout/banana.ctp


tests/test_app/TestApp/View/Layout/cache_empty_sections.ctp → tests/test_app/TestApp/Template/Layout/cache_empty_sections.ctp


tests/test_app/TestApp/View/Layout/cache_layout.ctp → tests/test_app/TestApp/Template/Layout/cache_layout.ctp


tests/test_app/TestApp/View/Layout/default.ctp → tests/test_app/TestApp/Template/Layout/default.ctp


tests/test_app/TestApp/View/Layout/error.ctp → tests/test_app/TestApp/Template/Layout/error.ctp


tests/test_app/TestApp/View/Layout/js/default.ctp → tests/test_app/TestApp/Template/Layout/js/default.ctp


tests/test_app/TestApp/View/Layout/json/default.ctp → tests/test_app/TestApp/Template/Layout/json/default.ctp


tests/test_app/TestApp/View/Layout/multi_cache.ctp → tests/test_app/TestApp/Template/Layout/multi_cache.ctp


tests/test_app/TestApp/View/Layout/rss/default.ctp → tests/test_app/TestApp/Template/Layout/rss/default.ctp


tests/test_app/TestApp/View/Layout/xml/default.ctp → tests/test_app/TestApp/Template/Layout/xml/default.ctp


tests/test_app/TestApp/View/Pages/extract.ctp → tests/test_app/TestApp/Template/Pages/extract.ctp


tests/test_app/TestApp/View/Pages/home.ctp → tests/test_app/TestApp/Template/Pages/home.ctp


tests/test_app/TestApp/View/Pages/page.home.ctp → tests/test_app/TestApp/Template/Pages/page.home.ctp


tests/test_app/TestApp/View/Posts/alt_ext.alt → tests/test_app/TestApp/Template/Posts/alt_ext.alt


tests/test_app/TestApp/View/Posts/cache_empty_sections.ctp → tests/test_app/TestApp/Template/Posts/cache_empty_sections.ctp


tests/test_app/TestApp/View/Posts/cache_form.ctp → tests/test_app/TestApp/Template/Posts/cache_form.ctp


tests/test_app/TestApp/View/Posts/extend_element.ctp → tests/test_app/TestApp/Template/Posts/extend_element.ctp


tests/test_app/TestApp/View/Posts/extend_loop.ctp → tests/test_app/TestApp/Template/Posts/extend_loop.ctp


tests/test_app/TestApp/View/Posts/extend_loop_inner.ctp → tests/test_app/TestApp/Template/Posts/extend_loop_inner.ctp


tests/test_app/TestApp/View/Posts/extend_missing_element.ctp → tests/test_app/TestApp/Template/Posts/extend_missing_element.ctp


tests/test_app/TestApp/View/Posts/extend_self.ctp → tests/test_app/TestApp/Template/Posts/extend_self.ctp


tests/test_app/TestApp/View/Posts/extend_with_element.ctp → tests/test_app/TestApp/Template/Posts/extend_with_element.ctp


tests/test_app/TestApp/View/Posts/helper_overwrite.ctp → tests/test_app/TestApp/Template/Posts/helper_overwrite.ctp


tests/test_app/TestApp/View/Posts/index.ctp → tests/test_app/TestApp/Template/Posts/index.ctp


tests/test_app/TestApp/View/Posts/json/index.ctp → tests/test_app/TestApp/Template/Posts/json/index.ctp


tests/test_app/TestApp/View/Posts/multiple_nocache.ctp → tests/test_app/TestApp/Template/Posts/multiple_nocache.ctp


tests/test_app/TestApp/View/Posts/nested_extends.ctp → tests/test_app/TestApp/Template/Posts/nested_extends.ctp


tests/test_app/TestApp/View/Posts/nocache_multiple_element.ctp → tests/test_app/TestApp/Template/Posts/nocache_multiple_element.ctp


tests/test_app/TestApp/View/Posts/open_block.ctp → tests/test_app/TestApp/Template/Posts/open_block.ctp


tests/test_app/TestApp/View/Posts/parent_1.ctp → tests/test_app/TestApp/Template/Posts/parent_1.ctp


+ 0 - 0
tests/test_app/TestApp/View/Posts/parent_2.ctp


Some files were not shown because too many files changed in this diff