Skip to content

Commit 3722f0d

Browse files
committed
fix: update namespace imports in ExampleTest and SetupCmsCommand for consistency
1 parent 55ab92f commit 3722f0d

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/Console/Commands/SetupCmsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ protected function setupTranslations()
144144

145145
foreach ($replacements as $key => $newClass) {
146146
$content = preg_replace(
147-
"/(['\"]$key['\"]\s*=>\s*).*?,/",
147+
"/(['\"]" . $key . "['\"]\s*=>\s*).*?,/",
148148
"$1$newClass,",
149149
$content
150150
);
@@ -158,7 +158,7 @@ protected function setupTranslations()
158158

159159
foreach ($controllerReplacements as $key => $newClass) {
160160
$content = preg_replace(
161-
"/(['\"]$key['\"]\s*=>\s*).*?,/",
161+
"/(['\"]" . $key . "['\"]\s*=>\s*).*?,/",
162162
"$1$newClass,",
163163
$content
164164
);

tests/Feature/ExampleTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Foundation\Testing\RefreshDatabase;
66
use Javaabu\Cms\Models\Post;
7-
use Orchestra\Testbench\TestCase;
7+
use Javaabu\Cms\Tests\TestCase;
88
use PHPUnit\Framework\Attributes\Test;
99

1010
class ExampleTest extends TestCase
@@ -18,5 +18,4 @@ public function it_can_make_a_blank_post_object(): void
1818

1919
$this->assertInstanceOf(Post::class, $post);
2020
}
21-
2221
}

0 commit comments

Comments
 (0)