Permalink
Browse files

Moving shell templates dirs.

Updating TemplateTask to reflect changes in directories.
Updating test cases to use App::build()/App::path()
  • Loading branch information...
1 parent e9afb63 commit b4f4aeeec7030bd973a036f2b3bb39354d908622 @markstory markstory committed Jul 26, 2009
Showing with 15 additions and 9 deletions.
  1. +2 −1 cake/console/libs/tasks/template.php
  2. 0 cake/console/libs/templates/skel/views/pages/empty
  3. 0 cake/console/libs/templates/skel/views/scaffolds/empty
  4. 0 cake/console/{libs → }/templates/default/actions/controller_actions.ctp
  5. 0 cake/console/{libs → }/templates/default/classes/controller.ctp
  6. 0 cake/console/{libs → }/templates/default/classes/fixture.ctp
  7. 0 cake/console/{libs → }/templates/default/classes/model.ctp
  8. 0 cake/console/{libs → }/templates/default/classes/test.ctp
  9. 0 cake/console/{libs → }/templates/default/views/form.ctp
  10. 0 cake/console/{libs → }/templates/default/views/home.ctp
  11. 0 cake/console/{libs → }/templates/default/views/index.ctp
  12. 0 cake/console/{libs → }/templates/default/views/view.ctp
  13. 0 cake/console/{libs → }/templates/skel/.htaccess
  14. 0 cake/console/{libs → }/templates/skel/app_controller.php
  15. 0 cake/console/{libs → }/templates/skel/app_helper.php
  16. 0 cake/console/{libs → }/templates/skel/app_model.php
  17. 0 cake/console/{libs → }/templates/skel/config/acl.ini.php
  18. 0 cake/console/{libs → }/templates/skel/config/bootstrap.php
  19. 0 cake/console/{libs → }/templates/skel/config/core.php
  20. 0 cake/console/{libs → }/templates/skel/config/database.php.default
  21. 0 cake/console/{libs → }/templates/skel/config/inflections.php
  22. 0 cake/console/{libs → }/templates/skel/config/routes.php
  23. 0 cake/console/{libs → }/templates/skel/config/sql/db_acl.php
  24. 0 cake/console/{libs → }/templates/skel/config/sql/db_acl.sql
  25. 0 cake/console/{libs → }/templates/skel/config/sql/i18n.php
  26. 0 cake/console/{libs → }/templates/skel/config/sql/i18n.sql
  27. 0 cake/console/{libs → }/templates/skel/config/sql/sessions.php
  28. 0 cake/console/{libs → }/templates/skel/config/sql/sessions.sql
  29. 0 cake/console/{libs → }/templates/skel/controllers/components/empty
  30. 0 cake/console/{libs → }/templates/skel/controllers/pages_controller.php
  31. 0 cake/console/{libs → }/templates/skel/index.php
  32. 0 cake/console/{libs → }/templates/skel/locale/eng/LC_MESSAGES/empty
  33. 0 cake/console/{libs → }/templates/skel/models/behaviors/empty
  34. 0 cake/console/{libs → }/templates/skel/models/datasources/empty
  35. 0 cake/console/{libs → }/templates/skel/plugins/empty
  36. 0 cake/console/{libs → }/templates/skel/tests/cases/behaviors/empty
  37. 0 cake/console/{libs → }/templates/skel/tests/cases/components/empty
  38. 0 cake/console/{libs → }/templates/skel/tests/cases/controllers/empty
  39. 0 cake/console/{libs → }/templates/skel/tests/cases/datasources/empty
  40. 0 cake/console/{libs → }/templates/skel/tests/cases/helpers/empty
  41. 0 cake/console/{libs → }/templates/skel/tests/cases/models/empty
  42. 0 cake/console/{libs → }/templates/skel/tests/cases/shells/empty
  43. 0 cake/console/{libs → }/templates/skel/tests/fixtures/empty
  44. 0 cake/console/{libs → }/templates/skel/tests/groups/empty
  45. 0 cake/console/{libs → }/templates/skel/tmp/cache/models/empty
  46. 0 cake/console/{libs → }/templates/skel/tmp/cache/persistent/empty
  47. 0 cake/console/{libs → }/templates/skel/tmp/cache/views/empty
  48. 0 cake/console/{libs → }/templates/skel/tmp/logs/empty
  49. 0 cake/console/{libs → }/templates/skel/tmp/sessions/empty
  50. 0 cake/console/{libs → }/templates/skel/tmp/tests/empty
  51. 0 cake/console/{libs → }/templates/skel/views/elements/email/html/default.ctp
  52. 0 cake/console/{libs → }/templates/skel/views/elements/email/text/default.ctp
  53. 0 cake/console/{libs/templates/skel/vendors/shells/tasks → templates/skel/views/elements}/empty
  54. 0 cake/console/{libs/templates/skel/vendors/shells/templates → templates/skel/views/errors}/empty
  55. 0 cake/console/{libs/templates/skel/views/elements → templates/skel/views/helpers}/empty
  56. 0 cake/console/{libs → }/templates/skel/views/layouts/ajax.ctp
  57. 0 cake/console/{libs → }/templates/skel/views/layouts/default.ctp
  58. 0 cake/console/{libs → }/templates/skel/views/layouts/email/html/default.ctp
  59. 0 cake/console/{libs → }/templates/skel/views/layouts/email/text/default.ctp
  60. 0 cake/console/{libs → }/templates/skel/views/layouts/flash.ctp
  61. 0 cake/console/{libs → }/templates/skel/views/layouts/js/default.ctp
  62. 0 cake/console/{libs → }/templates/skel/views/layouts/rss/default.ctp
  63. 0 cake/console/{libs → }/templates/skel/views/layouts/xml/default.ctp
  64. 0 cake/console/{libs/templates/skel/views/errors → templates/skel/views/pages}/empty
  65. 0 cake/console/{libs/templates/skel/views/helpers → templates/skel/views/scaffolds}/empty
  66. 0 cake/console/{libs → }/templates/skel/webroot/.htaccess
  67. 0 cake/console/{libs → }/templates/skel/webroot/css.php
  68. 0 cake/console/{libs → }/templates/skel/webroot/css/cake.generic.css
  69. BIN cake/console/{libs → }/templates/skel/webroot/favicon.ico
  70. BIN cake/console/{libs → }/templates/skel/webroot/img/cake.icon.gif
  71. BIN cake/console/{libs → }/templates/skel/webroot/img/cake.power.gif
  72. 0 cake/console/{libs → }/templates/skel/webroot/index.php
  73. 0 cake/console/{libs → }/templates/skel/webroot/js/vendors.php
  74. 0 cake/console/{libs → }/templates/skel/webroot/test.php
  75. +13 −8 cake/tests/cases/console/libs/tasks/template.test.php
@@ -52,7 +52,8 @@ function initialize() {
* @return array Array of bake themes that are installed.
**/
function _findThemes() {
- $paths = $this->Dispatch->shellPaths;
+ $paths = App::path('shells');
+ array_unshift($paths, CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS);
$themes = array();
foreach ($paths as $path) {
$Folder =& new Folder($path . 'templates', false);
@@ -100,7 +100,7 @@ function testSet() {
* @return void
**/
function testFindingInstalledThemesForBake() {
- $consoleLibs = CAKE_CORE_INCLUDE_PATH . DS . CONSOLE_LIBS;
+ $consoleLibs = CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS;
$this->Task->Dispatch->shellPaths = array($consoleLibs);
$this->Task->initialize();
$this->assertEqual($this->Task->templatePaths, array('default' => $consoleLibs . 'templates' . DS . 'default' . DS));
@@ -138,10 +138,13 @@ function testGetThemePath() {
* @return void
**/
function testGenerate() {
- $this->Task->Dispatch->shellPaths = array(
- TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS
- );
+ App::build(array(
+ 'shells' => array(
+ TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS
+ )
+ ));
$this->Task->initialize();
+ $this->Task->setReturnValue('in', 1);
$result = $this->Task->generate('classes', 'test_object', array('test' => 'foo'));
$expected = "I got rendered\nfoo";
$this->assertEqual($result, $expected);
@@ -154,10 +157,12 @@ function testGenerate() {
* @return void
**/
function testGenerateWithTemplateFallbacks() {
- $this->Task->Dispatch->shellPaths = array(
- TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS,
- CAKE_CORE_INCLUDE_PATH . DS . CONSOLE_LIBS
- );
+ App::build(array(
+ 'shells' => array(
+ TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS,
+ CAKE_CORE_INCLUDE_PATH . DS . 'console' . DS
+ )
+ ));
$this->Task->initialize();
$this->Task->params['theme'] = 'test';
$this->Task->set(array(

0 comments on commit b4f4aee

Please sign in to comment.