From 27cea6f98a50c0bd356af46cc66f682e2419b0cc Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Thu, 30 Aug 2018 09:26:22 +0800 Subject: [PATCH] Fix invalid model stub --- src/stubs/testcases/unit/model.stub | 4 ++-- tests/Generators/ModelTestGeneratorTest.php | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/stubs/testcases/unit/model.stub b/src/stubs/testcases/unit/model.stub index 3534768..a144bda 100644 --- a/src/stubs/testcases/unit/model.stub +++ b/src/stubs/testcases/unit/model.stub @@ -17,9 +17,9 @@ class MasterTest extends TestCase $singleMstr = factory(Master::class)->create(); $title = __('app.show_detail_title', [ - 'name' => $singleMstr->name, 'type' => __('vehicle.vehicle'), + 'name' => $singleMstr->name, 'type' => __('master.master'), ]); - $link = ''; $link .= $singleMstr->name; $link .= ''; diff --git a/tests/Generators/ModelTestGeneratorTest.php b/tests/Generators/ModelTestGeneratorTest.php index 401c251..e7fd6a8 100644 --- a/tests/Generators/ModelTestGeneratorTest.php +++ b/tests/Generators/ModelTestGeneratorTest.php @@ -32,9 +32,9 @@ class {$this->model_name}Test extends TestCase \${$this->single_model_var_name} = factory({$this->model_name}::class)->create(); \$title = __('app.show_detail_title', [ - 'name' => \${$this->single_model_var_name}->name, 'type' => __('vehicle.vehicle'), + 'name' => \${$this->single_model_var_name}->name, 'type' => __('{$this->lang_name}.{$this->lang_name}'), ]); - \$link = 'single_model_var_name}).'\"'; + \$link = 'table_name}.show', \${$this->single_model_var_name}).'\"'; \$link .= ' title=\"'.\$title.'\">'; \$link .= \${$this->single_model_var_name}->name; \$link .= ''; @@ -84,9 +84,9 @@ class {$this->model_name}Test extends TestCase \${$this->single_model_var_name} = factory({$this->model_name}::class)->create(); \$title = __('app.show_detail_title', [ - 'name' => \${$this->single_model_var_name}->name, 'type' => __('vehicle.vehicle'), + 'name' => \${$this->single_model_var_name}->name, 'type' => __('{$this->lang_name}.{$this->lang_name}'), ]); - \$link = 'single_model_var_name}).'\"'; + \$link = 'table_name}.show', \${$this->single_model_var_name}).'\"'; \$link .= ' title=\"'.\$title.'\">'; \$link .= \${$this->single_model_var_name}->name; \$link .= ''; @@ -136,9 +136,9 @@ class {$this->model_name}Test extends TestCase \${$this->single_model_var_name} = factory({$this->model_name}::class)->create(); \$title = __('app.show_detail_title', [ - 'name' => \${$this->single_model_var_name}->name, 'type' => __('vehicle.vehicle'), + 'name' => \${$this->single_model_var_name}->name, 'type' => __('{$this->lang_name}.{$this->lang_name}'), ]); - \$link = 'single_model_var_name}).'\"'; + \$link = 'table_name}.show', \${$this->single_model_var_name}).'\"'; \$link .= ' title=\"'.\$title.'\">'; \$link .= \${$this->single_model_var_name}->name; \$link .= '';