Skip to content
Browse files

Moved view files under "Template" folder.

  • Loading branch information...
1 parent cc2fcf7 commit dc68840ed2e8f720687b23efefec383c68f06057 @ADmad ADmad committed
Showing with 55 additions and 55 deletions.
  1. +6 −6 src/Core/App.php
  2. 0 src/{View → Template}/Element/exception_stack_trace.ctp
  3. 0 src/{View → Template}/Element/sql_dump.ctp
  4. 0 src/{View → Template}/Error/fatal_error.ctp
  5. 0 src/{View → Template}/Error/missing_action.ctp
  6. 0 src/{View → Template}/Error/missing_behavior.ctp
  7. 0 src/{View → Template}/Error/missing_component.ctp
  8. 0 src/{View → Template}/Error/missing_connection.ctp
  9. 0 src/{View → Template}/Error/missing_controller.ctp
  10. 0 src/{View → Template}/Error/missing_database.ctp
  11. 0 src/{View → Template}/Error/missing_datasource.ctp
  12. 0 src/{View → Template}/Error/missing_datasource_config.ctp
  13. 0 src/{View → Template}/Error/missing_helper.ctp
  14. 0 src/{View → Template}/Error/missing_layout.ctp
  15. 0 src/{View → Template}/Error/missing_plugin.ctp
  16. 0 src/{View → Template}/Error/missing_table.ctp
  17. 0 src/{View → Template}/Error/missing_view.ctp
  18. 0 src/{View → Template}/Error/pdo_error.ctp
  19. 0 src/{View → Template}/Error/private_action.ctp
  20. 0 src/{View → 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 tests/test_app/Plugin/TestPlugin/{View → Template}/Element/plugin_element.ctp
  29. 0 tests/test_app/Plugin/TestPlugin/{View → Template}/Element/sub_dir/sub_element.ctp
  30. 0 tests/test_app/Plugin/TestPlugin/{View → Template}/Element/test_plugin_element.ctp
  31. 0 tests/test_app/Plugin/TestPlugin/{View → Template}/Element/translate.ctp
  32. 0 tests/test_app/Plugin/TestPlugin/{View → Template}/Email/text/test_plugin_tpl.ctp
  33. 0 tests/test_app/Plugin/TestPlugin/{View → Template}/Layout/Email/text/plug_default.ctp
  34. 0 tests/test_app/Plugin/TestPlugin/{View → Template}/Layout/default.ctp
  35. 0 tests/test_app/Plugin/TestPlugin/{View → Template}/Tests/index.ctp
  36. 0 tests/test_app/Plugin/TestPlugin/{View → Template}/Tests/scaffold.form.ctp
  37. 0 tests/test_app/TestApp/{View → Template}/Element/extended_element.ctp
  38. 0 tests/test_app/TestApp/{View → Template}/Element/extended_missing_element.ctp
  39. 0 tests/test_app/TestApp/{View → Template}/Element/html_call.ctp
  40. 0 tests/test_app/TestApp/{View → Template}/Element/nocache/contains_nocache.ctp
  41. 0 tests/test_app/TestApp/{View → Template}/Element/nocache/plain.ctp
  42. 0 tests/test_app/TestApp/{View → Template}/Element/nocache/sub1.ctp
  43. 0 tests/test_app/TestApp/{View → Template}/Element/nocache/sub2.ctp
  44. 0 tests/test_app/TestApp/{View → Template}/Element/parent_element.ctp
  45. 0 tests/test_app/TestApp/{View → Template}/Element/session_helper.ctp
  46. 0 tests/test_app/TestApp/{View → Template}/Element/test_element.ctp
  47. 0 tests/test_app/TestApp/{View → Template}/Element/test_element.xml
  48. 0 tests/test_app/TestApp/{View → Template}/Element/type_check.ctp
  49. 0 tests/test_app/TestApp/{View → Template}/Email/html/custom.ctp
  50. 0 tests/test_app/TestApp/{View → Template}/Email/html/default.ctp
  51. 0 tests/test_app/TestApp/{View → Template}/Email/html/html.ctp
  52. 0 tests/test_app/TestApp/{View → Template}/Email/html/image.ctp
  53. 0 tests/test_app/TestApp/{View → Template}/Email/html/japanese.ctp
  54. 0 tests/test_app/TestApp/{View → Template}/Email/html/nested_element.ctp
  55. 0 tests/test_app/TestApp/{View → Template}/Email/text/custom.ctp
  56. 0 tests/test_app/TestApp/{View → Template}/Email/text/custom_helper.ctp
  57. 0 tests/test_app/TestApp/{View → Template}/Email/text/default.ctp
  58. 0 tests/test_app/TestApp/{View → Template}/Email/text/japanese.ctp
  59. 0 tests/test_app/TestApp/{View → Template}/Email/text/wide.ctp
  60. 0 tests/test_app/TestApp/{View/Scaffold → Template/Error}/empty
  61. 0 tests/test_app/TestApp/{View → Template}/Error/error400.ctp
  62. 0 tests/test_app/TestApp/{View → Template}/Error/error500.ctp
  63. 0 tests/test_app/TestApp/{View → Template}/Layout/Email/html/default.ctp
  64. 0 tests/test_app/TestApp/{View → Template}/Layout/Email/html/japanese.ctp
  65. 0 tests/test_app/TestApp/{View → Template}/Layout/Email/html/thin.ctp
  66. 0 tests/test_app/TestApp/{View → Template}/Layout/Email/text/default.ctp
  67. 0 tests/test_app/TestApp/{View → Template}/Layout/Email/text/japanese.ctp
  68. 0 tests/test_app/TestApp/{View → Template}/Layout/ajax.ctp
  69. 0 tests/test_app/TestApp/{View → Template}/Layout/ajax2.ctp
  70. 0 tests/test_app/TestApp/{View → Template}/Layout/banana.ctp
  71. 0 tests/test_app/TestApp/{View → Template}/Layout/cache_empty_sections.ctp
  72. 0 tests/test_app/TestApp/{View → Template}/Layout/cache_layout.ctp
  73. 0 tests/test_app/TestApp/{View → Template}/Layout/default.ctp
  74. 0 tests/test_app/TestApp/{View → Template}/Layout/error.ctp
  75. 0 tests/test_app/TestApp/{View → Template}/Layout/js/default.ctp
  76. 0 tests/test_app/TestApp/{View → Template}/Layout/json/default.ctp
  77. 0 tests/test_app/TestApp/{View → Template}/Layout/multi_cache.ctp
  78. 0 tests/test_app/TestApp/{View → Template}/Layout/rss/default.ctp
  79. 0 tests/test_app/TestApp/{View → Template}/Layout/xml/default.ctp
  80. 0 tests/test_app/TestApp/{View → Template}/Pages/extract.ctp
  81. 0 tests/test_app/TestApp/{View → Template}/Pages/home.ctp
  82. 0 tests/test_app/TestApp/{View → Template}/Pages/page.home.ctp
  83. 0 tests/test_app/TestApp/{View → Template}/Posts/alt_ext.alt
  84. 0 tests/test_app/TestApp/{View → Template}/Posts/cache_empty_sections.ctp
  85. 0 tests/test_app/TestApp/{View → Template}/Posts/cache_form.ctp
  86. 0 tests/test_app/TestApp/{View → Template}/Posts/extend_element.ctp
  87. 0 tests/test_app/TestApp/{View → Template}/Posts/extend_loop.ctp
  88. 0 tests/test_app/TestApp/{View → Template}/Posts/extend_loop_inner.ctp
  89. 0 tests/test_app/TestApp/{View → Template}/Posts/extend_missing_element.ctp
  90. 0 tests/test_app/TestApp/{View → Template}/Posts/extend_self.ctp
  91. 0 tests/test_app/TestApp/{View → Template}/Posts/extend_with_element.ctp
  92. 0 tests/test_app/TestApp/{View → Template}/Posts/helper_overwrite.ctp
  93. 0 tests/test_app/TestApp/{View → Template}/Posts/index.ctp
  94. 0 tests/test_app/TestApp/{View → Template}/Posts/json/index.ctp
  95. 0 tests/test_app/TestApp/{View → Template}/Posts/multiple_nocache.ctp
  96. 0 tests/test_app/TestApp/{View → Template}/Posts/nested_extends.ctp
  97. 0 tests/test_app/TestApp/{View → Template}/Posts/nocache_multiple_element.ctp
  98. 0 tests/test_app/TestApp/{View → Template}/Posts/open_block.ctp
  99. 0 tests/test_app/TestApp/{View → Template}/Posts/parent_1.ctp
  100. 0 tests/test_app/TestApp/{View → Template}/Posts/parent_2.ctp
  101. 0 tests/test_app/TestApp/{View → Template}/Posts/parent_view.ctp
  102. 0 tests/test_app/TestApp/{View → Template}/Posts/scaffold.form.ctp
  103. 0 tests/test_app/TestApp/{View → Template}/Posts/sequencial_nocache.ctp
  104. 0 tests/test_app/TestApp/{View → Template}/Posts/test_nocache_tags.ctp
  105. 0 tests/test_app/TestApp/{View → Template}/Posts/xml/index.ctp
  106. 0 tests/test_app/TestApp/{View/Error → Template/Scaffold}/empty
  107. 0 tests/test_app/TestApp/{View → Template}/TestsApps/index.ctp
  108. 0 tests/test_app/TestApp/{View → Template}/TestsApps/json/index.ctp
  109. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/Element/test_element.ctp
  110. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/Email/text/themed.ctp
  111. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/Layout/default.ctp
  112. 0 ...t_app/TestApp/{View → Template}/Themed/TestTheme/Plugin/TestPlugin/Email/text/test_plugin_tpl.ctp
  113. 0 ...s/test_app/TestApp/{View → Template}/Themed/TestTheme/Plugin/TestPlugin/Layout/plugin_default.ctp
  114. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/Plugin/TestPlugin/Tests/index.ctp
  115. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/Posts/index.ctp
  116. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/Posts/scaffold.index.ctp
  117. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/Posts/themed.ctp
  118. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/css/test_asset.css
  119. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/css/theme_webroot.css
  120. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/flash/theme_test.swf
  121. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/img/cake.power.gif
  122. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/img/test.jpg
  123. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/js/one/theme_one.js
  124. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/js/theme.js
  125. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/pdfs/theme_test.pdf
  126. 0 tests/test_app/TestApp/{View → Template}/Themed/TestTheme/webroot/space image.text
View
12 src/Core/App.php
@@ -25,9 +25,9 @@
*
* ### 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 @@ public static function path($type, $plugin = null) {
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 @@ public static function pluginPath($plugin) {
*/
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;
View
0 src/View/Element/exception_stack_trace.ctp → ...emplate/Element/exception_stack_trace.ctp
File renamed without changes.
View
0 src/View/Element/sql_dump.ctp → src/Template/Element/sql_dump.ctp
File renamed without changes.
View
0 src/View/Error/fatal_error.ctp → src/Template/Error/fatal_error.ctp
File renamed without changes.
View
0 src/View/Error/missing_action.ctp → src/Template/Error/missing_action.ctp
File renamed without changes.
View
0 src/View/Error/missing_behavior.ctp → src/Template/Error/missing_behavior.ctp
File renamed without changes.
View
0 src/View/Error/missing_component.ctp → src/Template/Error/missing_component.ctp
File renamed without changes.
View
0 src/View/Error/missing_connection.ctp → src/Template/Error/missing_connection.ctp
File renamed without changes.
View
0 src/View/Error/missing_controller.ctp → src/Template/Error/missing_controller.ctp
File renamed without changes.
View
0 src/View/Error/missing_database.ctp → src/Template/Error/missing_database.ctp
File renamed without changes.
View
0 src/View/Error/missing_datasource.ctp → src/Template/Error/missing_datasource.ctp
File renamed without changes.
View
0 src/View/Error/missing_datasource_config.ctp → ...plate/Error/missing_datasource_config.ctp
File renamed without changes.
View
0 src/View/Error/missing_helper.ctp → src/Template/Error/missing_helper.ctp
File renamed without changes.
View
0 src/View/Error/missing_layout.ctp → src/Template/Error/missing_layout.ctp
File renamed without changes.
View
0 src/View/Error/missing_plugin.ctp → src/Template/Error/missing_plugin.ctp
File renamed without changes.
View
0 src/View/Error/missing_table.ctp → src/Template/Error/missing_table.ctp
File renamed without changes.
View
0 src/View/Error/missing_view.ctp → src/Template/Error/missing_view.ctp
File renamed without changes.
View
0 src/View/Error/pdo_error.ctp → src/Template/Error/pdo_error.ctp
File renamed without changes.
View
0 src/View/Error/private_action.ctp → src/Template/Error/private_action.ctp
File renamed without changes.
View
0 src/View/Error/scaffold_error.ctp → src/Template/Error/scaffold_error.ctp
File renamed without changes.
View
10 src/View/View.php
@@ -369,7 +369,7 @@ public function setEventManager(EventManager $eventManager) {
* 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 @@ public function element($name, $data = array(), $options = array()) {
/**
* 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 @@ protected function _paths($plugin = null, $cached = true) {
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 @@ protected function _paths($plugin = null, $cached = true) {
$paths[] = $viewPaths[$i] . 'Plugin' . DS . $plugin . DS;
}
}
- $paths = array_merge($paths, App::path('View', $plugin));
+ $paths = array_merge($paths, App::path('Template', $plugin));

This breaks a working app. With this change, I get a 500 error (actually, cannot find the 500 error!), but when I change it back to 'View', it works.

@markstory CakePHP member

We're still pre-alpha things are going to break possibly often.

That's why I'm trying it out and mentioning these bugs :)

@markstory CakePHP member

Its not a bug, the code just changed. You might need to update/rebuild your application skeleton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
$paths = array_unique(array_merge($paths, $viewPaths));
View
10 tests/TestCase/Console/Command/Task/ExtractTaskTest.php
@@ -72,7 +72,7 @@ public function tearDown() {
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 @@ public function testExecute() {
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 @@ public function testExtractCategory() {
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 @@ public function testExtractMultiplePaths() {
$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';
View
4 tests/TestCase/Core/AppTest.php
@@ -259,11 +259,11 @@ public function testPluginPath() {
*/
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);
}
View
14 tests/TestCase/Routing/DispatcherTest.php
@@ -757,31 +757,31 @@ public static function assetProvider() {
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',
View
2 tests/TestCase/View/HelperTest.php
@@ -858,7 +858,7 @@ public function testWebrootPaths() {
$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';
View
56 tests/TestCase/View/ViewTest.php
@@ -308,25 +308,25 @@ public function testGetTemplate() {
$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 @@ public function testPluginGetTemplate() {
$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 @@ public function testPluginThemedGetTemplate() {
$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 @@ public function testPluginPathGeneration() {
$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 @@ public function testCamelCasePluginGetTemplate() {
$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 @@ public function testGetViewFileNames() {
$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 @@ public function testGetLayoutFileName() {
$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 @@ public function testGetLayoutFileNamePlugin() {
$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 @@ public function testGetViewFileNameSubdirWithPluginAndViewPath() {
$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 @@ public function testViewFileName() {
$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);
}
View
2 tests/init.php
@@ -79,7 +79,7 @@
'cssBaseUrl' => 'css/',
'paths' => [
'plugins' => [TEST_APP . 'Plugin/'],
- 'views' => [APP . 'View/']
+ 'templates' => [APP . 'Template/']
]
]);
View
0 ...estPlugin/View/Element/plugin_element.ctp → ...lugin/Template/Element/plugin_element.ctp
File renamed without changes.
View
0 ...ugin/View/Element/sub_dir/sub_element.ctp → .../Template/Element/sub_dir/sub_element.ctp
File renamed without changes.
View
0 ...ugin/View/Element/test_plugin_element.ctp → .../Template/Element/test_plugin_element.ctp
File renamed without changes.
View
0 ...gin/TestPlugin/View/Element/translate.ctp → ...TestPlugin/Template/Element/translate.ctp
File renamed without changes.
View
0 ...lugin/View/Email/text/test_plugin_tpl.ctp → ...n/Template/Email/text/test_plugin_tpl.ctp
File renamed without changes.
View
0 ...n/View/Layout/Email/text/plug_default.ctp → ...mplate/Layout/Email/text/plug_default.ctp
File renamed without changes.
View
0 ...Plugin/TestPlugin/View/Layout/default.ctp → ...in/TestPlugin/Template/Layout/default.ctp
File renamed without changes.
View
0 ...pp/Plugin/TestPlugin/View/Tests/index.ctp → ...lugin/TestPlugin/Template/Tests/index.ctp
File renamed without changes.
View
0 ...n/TestPlugin/View/Tests/scaffold.form.ctp → ...stPlugin/Template/Tests/scaffold.form.ctp
File renamed without changes.
View
0 ...TestApp/View/Element/extended_element.ctp → ...App/Template/Element/extended_element.ctp
File renamed without changes.
View
0 ...View/Element/extended_missing_element.ctp → ...late/Element/extended_missing_element.ctp
File renamed without changes.
View
0 ...st_app/TestApp/View/Element/html_call.ctp → ...pp/TestApp/Template/Element/html_call.ctp
File renamed without changes.
View
0 ...View/Element/nocache/contains_nocache.ctp → ...late/Element/nocache/contains_nocache.ctp
File renamed without changes.
View
0 ...pp/TestApp/View/Element/nocache/plain.ctp → ...estApp/Template/Element/nocache/plain.ctp
File renamed without changes.
View
0 ...app/TestApp/View/Element/nocache/sub1.ctp → ...TestApp/Template/Element/nocache/sub1.ctp
File renamed without changes.
View
0 ...app/TestApp/View/Element/nocache/sub2.ctp → ...TestApp/Template/Element/nocache/sub2.ctp
File renamed without changes.
View
0 ...p/TestApp/View/Element/parent_element.ctp → ...stApp/Template/Element/parent_element.ctp
File renamed without changes.
View
0 ...p/TestApp/View/Element/session_helper.ctp → ...stApp/Template/Element/session_helper.ctp
File renamed without changes.
View
0 ...app/TestApp/View/Element/test_element.ctp → ...TestApp/Template/Element/test_element.ctp
File renamed without changes.
View
0 ...app/TestApp/View/Element/test_element.xml → ...TestApp/Template/Element/test_element.xml
File renamed without changes.
View
0 ...t_app/TestApp/View/Element/type_check.ctp → ...p/TestApp/Template/Element/type_check.ctp
File renamed without changes.
View
0 ...st_app/TestApp/View/Email/html/custom.ctp → ...pp/TestApp/Template/Email/html/custom.ctp
File renamed without changes.
View
0 ...t_app/TestApp/View/Email/html/default.ctp → ...p/TestApp/Template/Email/html/default.ctp
File renamed without changes.
View
0 ...test_app/TestApp/View/Email/html/html.ctp → ..._app/TestApp/Template/Email/html/html.ctp
File renamed without changes.
View
0 ...est_app/TestApp/View/Email/html/image.ctp → ...app/TestApp/Template/Email/html/image.ctp
File renamed without changes.
View
0 ..._app/TestApp/View/Email/html/japanese.ctp → .../TestApp/Template/Email/html/japanese.ctp
File renamed without changes.
View
0 ...estApp/View/Email/html/nested_element.ctp → ...pp/Template/Email/html/nested_element.ctp
File renamed without changes.
View
0 ...st_app/TestApp/View/Email/text/custom.ctp → ...pp/TestApp/Template/Email/text/custom.ctp
File renamed without changes.
View
0 ...TestApp/View/Email/text/custom_helper.ctp → ...App/Template/Email/text/custom_helper.ctp
File renamed without changes.
View
0 ...t_app/TestApp/View/Email/text/default.ctp → ...p/TestApp/Template/Email/text/default.ctp
File renamed without changes.
View
0 ..._app/TestApp/View/Email/text/japanese.ctp → .../TestApp/Template/Email/text/japanese.ctp
File renamed without changes.
View
0 ...test_app/TestApp/View/Email/text/wide.ctp → ..._app/TestApp/Template/Email/text/wide.ctp
File renamed without changes.
View
0 tests/test_app/TestApp/View/Scaffold/empty → tests/test_app/TestApp/Template/Error/empty
File renamed without changes.
View
0 .../test_app/TestApp/View/Error/error400.ctp → ...t_app/TestApp/Template/Error/error400.ctp
File renamed without changes.
View
0 .../test_app/TestApp/View/Error/error500.ctp → ...t_app/TestApp/Template/Error/error500.ctp
File renamed without changes.
View
0 ...estApp/View/Layout/Email/html/default.ctp → ...pp/Template/Layout/Email/html/default.ctp
File renamed without changes.
View
0 ...stApp/View/Layout/Email/html/japanese.ctp → ...p/Template/Layout/Email/html/japanese.ctp
File renamed without changes.
View
0 ...p/TestApp/View/Layout/Email/html/thin.ctp → ...stApp/Template/Layout/Email/html/thin.ctp
File renamed without changes.
View
0 ...estApp/View/Layout/Email/text/default.ctp → ...pp/Template/Layout/Email/text/default.ctp
File renamed without changes.
View
0 ...stApp/View/Layout/Email/text/japanese.ctp → ...p/Template/Layout/Email/text/japanese.ctp
File renamed without changes.
View
0 tests/test_app/TestApp/View/Layout/ajax.ctp → ...test_app/TestApp/Template/Layout/ajax.ctp
File renamed without changes.
View
0 tests/test_app/TestApp/View/Layout/ajax2.ctp → ...est_app/TestApp/Template/Layout/ajax2.ctp
File renamed without changes.
View
0 ...s/test_app/TestApp/View/Layout/banana.ctp → ...st_app/TestApp/Template/Layout/banana.ctp
File renamed without changes.
View
0 ...tApp/View/Layout/cache_empty_sections.ctp → .../Template/Layout/cache_empty_sections.ctp
File renamed without changes.
View
0 ..._app/TestApp/View/Layout/cache_layout.ctp → .../TestApp/Template/Layout/cache_layout.ctp
File renamed without changes.
View
0 .../test_app/TestApp/View/Layout/default.ctp → ...t_app/TestApp/Template/Layout/default.ctp
File renamed without changes.
View
0 tests/test_app/TestApp/View/Layout/error.ctp → ...est_app/TestApp/Template/Layout/error.ctp
File renamed without changes.
View
0 ...st_app/TestApp/View/Layout/js/default.ctp → ...pp/TestApp/Template/Layout/js/default.ctp
File renamed without changes.
View
0 ..._app/TestApp/View/Layout/json/default.ctp → .../TestApp/Template/Layout/json/default.ctp
File renamed without changes.
View
0 ...t_app/TestApp/View/Layout/multi_cache.ctp → ...p/TestApp/Template/Layout/multi_cache.ctp
File renamed without changes.
View
0 ...t_app/TestApp/View/Layout/rss/default.ctp → ...p/TestApp/Template/Layout/rss/default.ctp
File renamed without changes.
View
0 ...t_app/TestApp/View/Layout/xml/default.ctp → ...p/TestApp/Template/Layout/xml/default.ctp
File renamed without changes.
View
0 ...s/test_app/TestApp/View/Pages/extract.ctp → ...st_app/TestApp/Template/Pages/extract.ctp
File renamed without changes.
View
0 tests/test_app/TestApp/View/Pages/home.ctp → .../test_app/TestApp/Template/Pages/home.ctp
File renamed without changes.
View
0 ...test_app/TestApp/View/Pages/page.home.ctp → ..._app/TestApp/Template/Pages/page.home.ctp
File renamed without changes.
View
0 ...s/test_app/TestApp/View/Posts/alt_ext.alt → ...st_app/TestApp/Template/Posts/alt_ext.alt
File renamed without changes.
View
0 ...stApp/View/Posts/cache_empty_sections.ctp → ...p/Template/Posts/cache_empty_sections.ctp
File renamed without changes.
View
0 ...est_app/TestApp/View/Posts/cache_form.ctp → ...app/TestApp/Template/Posts/cache_form.ctp
File renamed without changes.
View
0 ...app/TestApp/View/Posts/extend_element.ctp → ...TestApp/Template/Posts/extend_element.ctp
File renamed without changes.
View
0 ...st_app/TestApp/View/Posts/extend_loop.ctp → ...pp/TestApp/Template/Posts/extend_loop.ctp
File renamed without changes.
View
0 .../TestApp/View/Posts/extend_loop_inner.ctp → ...tApp/Template/Posts/extend_loop_inner.ctp
File renamed without changes.
View
0 ...App/View/Posts/extend_missing_element.ctp → ...Template/Posts/extend_missing_element.ctp
File renamed without changes.
View
0 ...st_app/TestApp/View/Posts/extend_self.ctp → ...pp/TestApp/Template/Posts/extend_self.ctp
File renamed without changes.
View
0 ...estApp/View/Posts/extend_with_element.ctp → ...pp/Template/Posts/extend_with_element.ctp
File renamed without changes.
View
0 ...p/TestApp/View/Posts/helper_overwrite.ctp → ...stApp/Template/Posts/helper_overwrite.ctp
File renamed without changes.
View
0 tests/test_app/TestApp/View/Posts/index.ctp → ...test_app/TestApp/Template/Posts/index.ctp
File renamed without changes.
View
0 ...est_app/TestApp/View/Posts/json/index.ctp → ...app/TestApp/Template/Posts/json/index.ctp
File renamed without changes.
View
0 ...p/TestApp/View/Posts/multiple_nocache.ctp → ...stApp/Template/Posts/multiple_nocache.ctp
File renamed without changes.
View
0 ...app/TestApp/View/Posts/nested_extends.ctp → ...TestApp/Template/Posts/nested_extends.ctp
File renamed without changes.
View
0 ...p/View/Posts/nocache_multiple_element.ctp → ...mplate/Posts/nocache_multiple_element.ctp
File renamed without changes.
View
0 ...est_app/TestApp/View/Posts/open_block.ctp → ...app/TestApp/Template/Posts/open_block.ctp
File renamed without changes.
View
0 .../test_app/TestApp/View/Posts/parent_1.ctp → ...t_app/TestApp/Template/Posts/parent_1.ctp
File renamed without changes.
View
0 .../test_app/TestApp/View/Posts/parent_2.ctp → ...t_app/TestApp/Template/Posts/parent_2.ctp
File renamed without changes.
View
0 ...st_app/TestApp/View/Posts/parent_view.ctp → ...pp/TestApp/Template/Posts/parent_view.ctp
File renamed without changes.
View
0 ..._app/TestApp/View/Posts/scaffold.form.ctp → .../TestApp/Template/Posts/scaffold.form.ctp
File renamed without changes.
View
0 ...TestApp/View/Posts/sequencial_nocache.ctp → ...App/Template/Posts/sequencial_nocache.ctp
File renamed without changes.
View
0 .../TestApp/View/Posts/test_nocache_tags.ctp → ...tApp/Template/Posts/test_nocache_tags.ctp
File renamed without changes.
View
0 ...test_app/TestApp/View/Posts/xml/index.ctp → ..._app/TestApp/Template/Posts/xml/index.ctp
File renamed without changes.
View
0 tests/test_app/TestApp/View/Error/empty → .../test_app/TestApp/Template/Scaffold/empty
File renamed without changes.
View
0 ...test_app/TestApp/View/TestsApps/index.ctp → ..._app/TestApp/Template/TestsApps/index.ctp
File renamed without changes.
View
0 ...app/TestApp/View/TestsApps/json/index.ctp → ...TestApp/Template/TestsApps/json/index.ctp
File renamed without changes.
View
0 ...Themed/TestTheme/Element/test_element.ctp → ...Themed/TestTheme/Element/test_element.ctp
File renamed without changes.
View
0 ...ew/Themed/TestTheme/Email/text/themed.ctp → ...te/Themed/TestTheme/Email/text/themed.ctp
File renamed without changes.
View
0 .../View/Themed/TestTheme/Layout/default.ctp → ...plate/Themed/TestTheme/Layout/default.ctp
File renamed without changes.
View
0 ...TestPlugin/Email/text/test_plugin_tpl.ctp → ...TestPlugin/Email/text/test_plugin_tpl.ctp
File renamed without changes.
View
0 ...ugin/TestPlugin/Layout/plugin_default.ctp → ...ugin/TestPlugin/Layout/plugin_default.ctp
File renamed without changes.
View
0 ...stTheme/Plugin/TestPlugin/Tests/index.ctp → ...stTheme/Plugin/TestPlugin/Tests/index.ctp
File renamed without changes.
View
0 ...App/View/Themed/TestTheme/Posts/index.ctp → ...Template/Themed/TestTheme/Posts/index.ctp
File renamed without changes.
View
0 ...Themed/TestTheme/Posts/scaffold.index.ctp → ...Themed/TestTheme/Posts/scaffold.index.ctp
File renamed without changes.
View
0 ...pp/View/Themed/TestTheme/Posts/themed.ctp → ...emplate/Themed/TestTheme/Posts/themed.ctp
File renamed without changes.
View
0 ...emed/TestTheme/webroot/css/test_asset.css → ...emed/TestTheme/webroot/css/test_asset.css
File renamed without changes.
View
0 ...d/TestTheme/webroot/css/theme_webroot.css → ...d/TestTheme/webroot/css/theme_webroot.css
File renamed without changes.
View
0 ...ed/TestTheme/webroot/flash/theme_test.swf → ...ed/TestTheme/webroot/flash/theme_test.swf
File renamed without changes.
View
0 ...emed/TestTheme/webroot/img/cake.power.gif → ...emed/TestTheme/webroot/img/cake.power.gif
File renamed without changes
View
0 ...iew/Themed/TestTheme/webroot/img/test.jpg → ...ate/Themed/TestTheme/webroot/img/test.jpg
File renamed without changes
View
0 ...med/TestTheme/webroot/js/one/theme_one.js → ...med/TestTheme/webroot/js/one/theme_one.js
File renamed without changes.
View
0 ...View/Themed/TestTheme/webroot/js/theme.js → ...late/Themed/TestTheme/webroot/js/theme.js
File renamed without changes.
View
0 ...med/TestTheme/webroot/pdfs/theme_test.pdf → ...med/TestTheme/webroot/pdfs/theme_test.pdf
File renamed without changes.
View
0 ...Themed/TestTheme/webroot/space image.text → ...Themed/TestTheme/webroot/space image.text
File renamed without changes.

0 comments on commit dc68840

Please sign in to comment.
Something went wrong with that request. Please try again.