diff --git a/tests/Generators/ModelGeneratorTest.php b/tests/Generators/ModelGeneratorTest.php index a2ea0c4..74f576e 100644 --- a/tests/Generators/ModelGeneratorTest.php +++ b/tests/Generators/ModelGeneratorTest.php @@ -56,15 +56,19 @@ class Category extends Model public function nameLink() { - return link_to_route('{$this->table_name}.show', \$this->name, [\$this->id], [ + return link_to_route('categories.show', \$this->name, [\$this->id], [ 'title' => trans( 'app.show_detail_title', - ['name' => \$this->name, 'type' => trans('{$this->lang_name}.{$this->lang_name}')] + ['name' => \$this->name, 'type' => trans('category.category')] ), ]); } } "; $this->assertEquals($modelClassContent, file_get_contents($modelPath)); + + // tearDown + $this->removeFileOrDir(resource_path('views/categories')); + $this->removeFileOrDir(resource_path("lang/en/category.php")); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 9b53213..b7edb69 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -17,7 +17,7 @@ abstract class TestCase extends BaseTestCase public function setUp() { parent::setUp(); - $this->model_name = class_basename('References/Category'); + $this->model_name = 'MemberType'; $this->full_model_name = 'App\\'.$this->model_name; $this->plural_model_name = str_plural($this->model_name);