From 780ede5bfaaf922fa9ceebb509fe7a7c7a16733f Mon Sep 17 00:00:00 2001 From: AD7six Date: Wed, 12 Nov 2014 21:45:06 +0000 Subject: [PATCH] reapply template -> theme change a set of bake tempates is implemented in exactly the same way as a view "theme" - by creating a plugin, with a `Template\Bake` folder --- src/Shell/BakeShell.php | 2 +- tests/TestCase/Shell/CompletionShellTest.php | 2 +- tests/TestCase/Shell/Task/TemplateTaskTest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Shell/BakeShell.php b/src/Shell/BakeShell.php index 7b757a9a6ca..ba9bffe8429 100644 --- a/src/Shell/BakeShell.php +++ b/src/Shell/BakeShell.php @@ -241,7 +241,7 @@ public function getOptionParser() { 'help' => 'Database connection to use in conjunction with `bake all`.', 'short' => 'c', 'default' => 'default' - ])->addOption('template', [ + ])->addOption('theme', [ 'short' => 't', 'help' => 'Theme to use when baking code.' ]); diff --git a/tests/TestCase/Shell/CompletionShellTest.php b/tests/TestCase/Shell/CompletionShellTest.php index 62bce7dd6dc..9205b0b877b 100644 --- a/tests/TestCase/Shell/CompletionShellTest.php +++ b/tests/TestCase/Shell/CompletionShellTest.php @@ -152,7 +152,7 @@ public function testOptions() { $this->Shell->runCommand(['options', 'bake']); $output = $this->out->output; - $expected = "--help -h --verbose -v --quiet -q --connection -c --template -t\n"; + $expected = "--help -h --verbose -v --quiet -q --connection -c --theme -t\n"; $this->assertTextEquals($expected, $output); } diff --git a/tests/TestCase/Shell/Task/TemplateTaskTest.php b/tests/TestCase/Shell/Task/TemplateTaskTest.php index 7cf1a4880b7..42f9170688c 100644 --- a/tests/TestCase/Shell/Task/TemplateTaskTest.php +++ b/tests/TestCase/Shell/Task/TemplateTaskTest.php @@ -70,7 +70,7 @@ public function testGenerate() { */ public function testGenerateWithTemplateOverride() { Plugin::load('TestBakeTheme'); - $this->Task->params['template'] = 'TestBakeTheme'; + $this->Task->params['theme'] = 'TestBakeTheme'; $this->Task->set(array( 'plugin' => 'Special' )); @@ -85,7 +85,7 @@ public function testGenerateWithTemplateOverride() { */ public function testGenerateWithTemplateFallbacks() { Plugin::load('TestBakeTheme'); - $this->Task->params['template'] = 'TestBakeTheme'; + $this->Task->params['theme'] = 'TestBakeTheme'; $this->Task->set(array( 'name' => 'Articles', 'table' => 'articles',