diff --git a/src/stubs/lang.stub b/src/stubs/lang.stub index 77e5e19..4cf21d6 100644 --- a/src/stubs/lang.stub +++ b/src/stubs/lang.stub @@ -13,6 +13,7 @@ return [ // Actions 'create' => 'Create new Master', 'created' => 'Create new Master succeded.', + 'show' => 'Master Detail', 'edit' => 'Edit Master', 'update' => 'Update Master', 'updated' => 'Update Master succeded.', @@ -20,6 +21,7 @@ return [ 'delete_confirm' => 'Are you sure to delete this Master?', 'deleted' => 'Delete Master succeded.', 'undeleted' => 'Master not deleted.', + 'undeleteable' => 'Master data cannot be deleted.', // Attributes 'name' => 'Master Name', diff --git a/src/stubs/test-policy.stub b/src/stubs/test-policy.stub index 71c858d..ed965ee 100644 --- a/src/stubs/test-policy.stub +++ b/src/stubs/test-policy.stub @@ -6,7 +6,7 @@ use fullMstr; use Illuminate\Foundation\Testing\DatabaseMigrations; use Tests\BrowserKitTest as TestCase; -class MasterTest extends TestCase +class MasterPolicyTest extends TestCase { use DatabaseMigrations; diff --git a/tests/Generators/LangGeneratorTest.php b/tests/Generators/LangGeneratorTest.php index 368b266..7d21b83 100644 --- a/tests/Generators/LangGeneratorTest.php +++ b/tests/Generators/LangGeneratorTest.php @@ -11,8 +11,8 @@ class LangGeneratorTest extends TestCase { $this->artisan('make:crud', ['name' => $this->model_name, '--no-interaction' => true]); - $locale = config('app.locale'); - $langPath = resource_path('lang/'.$locale.'/'.$this->lang_name.'.php'); + $locale = config('app.locale'); + $langPath = resource_path('lang/'.$locale.'/'.$this->lang_name.'.php'); $displayModelName = ucwords(str_replace('_', ' ', snake_case($this->model_name))); $this->assertFileExists($langPath); $langFileContent = " 'Create new {$displayModelName}', 'created' => 'Create new {$displayModelName} succeded.', + 'show' => '{$displayModelName} Detail', 'edit' => 'Edit {$displayModelName}', 'update' => 'Update {$displayModelName}', 'updated' => 'Update {$displayModelName} succeded.', @@ -37,6 +38,7 @@ return [ 'delete_confirm' => 'Are you sure to delete this {$displayModelName}?', 'deleted' => 'Delete {$displayModelName} succeded.', 'undeleted' => '{$displayModelName} not deleted.', + 'undeleteable' => '{$displayModelName} data cannot be deleted.', // Attributes 'name' => '{$displayModelName} Name', @@ -51,7 +53,7 @@ return [ { $this->artisan('make:crud', ['name' => $this->model_name, '--no-interaction' => true]); - $locale = config('app.locale'); + $locale = config('app.locale'); $langPath = resource_path('lang/'.$locale.'/app.php'); $this->assertFileExists($langPath); diff --git a/tests/Generators/ModelPolicyTestGeneratorTest.php b/tests/Generators/ModelPolicyTestGeneratorTest.php index f9f488e..08eb0c7 100644 --- a/tests/Generators/ModelPolicyTestGeneratorTest.php +++ b/tests/Generators/ModelPolicyTestGeneratorTest.php @@ -24,7 +24,7 @@ use {$this->full_model_name}; use Illuminate\Foundation\Testing\DatabaseMigrations; use Tests\BrowserKitTest as TestCase; -class {$this->model_name}Test extends TestCase +class {$this->model_name}PolicyTest extends TestCase { use DatabaseMigrations; @@ -84,7 +84,7 @@ use {$this->full_model_name}; use Illuminate\Foundation\Testing\DatabaseMigrations; use Tests\TestCase as TestCase; -class {$this->model_name}Test extends TestCase +class {$this->model_name}PolicyTest extends TestCase { use DatabaseMigrations;