Skip to content

Commit

Permalink
fix namespace generation
Browse files Browse the repository at this point in the history
  • Loading branch information
axyr committed Aug 16, 2024
1 parent 5fd75a0 commit c0c0332
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resources/stubs/FilterTest.stub
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace {{namespace}};
namespace {{baseNamespace}}\{{moduleName}}\Tests\Filters;

use {{baseNamespace}}\{{moduleName}}\Factories\{{modelName}}Factory;
use {{baseNamespace}}\{{moduleName}}\Filters\{{modelName}}Filter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static function dataGenerator(): array
'module' => 'Posts',
'expectedPath' => 'app-modules/Posts/tests/Http/Controllers/PostControllerAuthorizationTest.php',
'expectedStrings' => [
'namespace App\Modules\Posts\Tests\Http\Controllers;',
'class PostControllerAuthorizationTest extends TestCase',
'use App\Modules\Posts\Factories\PostFactory;',
'use App\Modules\Posts\Models\Post;',
Expand Down
1 change: 1 addition & 0 deletions tests/Generators/ControllerTestGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static function dataGenerator(): array
'module' => 'Posts',
'expectedPath' => 'app-modules/Posts/tests/Http/Controllers/PostControllerTest.php',
'expectedStrings' => [
'namespace App\Modules\Posts\Tests\Http\Controllers;',
'class PostControllerTest extends TestCase',
'use App\Modules\Posts\Factories\PostFactory;',
'use App\Modules\Posts\Models\Post;',
Expand Down
1 change: 1 addition & 0 deletions tests/Generators/FilterTestGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static function dataGenerator(): array
'module' => 'Posts',
'expectedPath' => 'app-modules/Posts/tests/Filters/PostFilterTest.php',
'expectedStrings' => [
'namespace App\Modules\Posts\Tests\Filters;',
'class PostFilterTest extends TestCase',
'use App\Modules\Posts\Factories\PostFactory;',
'use App\Modules\Posts\Filters\PostFilter;',
Expand Down

0 comments on commit c0c0332

Please sign in to comment.