Browse Source

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
AD7six 11 years ago
parent
commit
780ede5bfa

+ 1 - 1
src/Shell/BakeShell.php

@@ -241,7 +241,7 @@ class BakeShell extends Shell {
 			'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.'
 		]);

+ 1 - 1
tests/TestCase/Shell/CompletionShellTest.php

@@ -152,7 +152,7 @@ class CompletionShellTest extends TestCase {
 		$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);
 	}
 

+ 2 - 2
tests/TestCase/Shell/Task/TemplateTaskTest.php

@@ -70,7 +70,7 @@ class TemplateTaskTest extends TestCase {
  */
 	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 @@ class TemplateTaskTest extends TestCase {
  */
 	public function testGenerateWithTemplateFallbacks() {
 		Plugin::load('TestBakeTheme');
-		$this->Task->params['template'] = 'TestBakeTheme';
+		$this->Task->params['theme'] = 'TestBakeTheme';
 		$this->Task->set(array(
 			'name' => 'Articles',
 			'table' => 'articles',