diff --git a/tests/InstallCommandTest.php b/tests/InstallCommandTest.php index be22902..ec2c9b2 100644 --- a/tests/InstallCommandTest.php +++ b/tests/InstallCommandTest.php @@ -2,23 +2,24 @@ namespace Esign\InstallCommand\Tests; +use PHPUnit\Framework\Attributes\Test; use Esign\InstallCommand\Exceptions\CouldNotInstallNodePackagesException; use Esign\InstallCommand\Tests\Support\InstallCommand; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Process; -class InstallCommandTest extends TestCase +final class InstallCommandTest extends TestCase { - /** @test */ - public function it_can_publish_files() + #[Test] + public function it_can_publish_files(): void { $this->artisan(InstallCommand::class); $this->assertFileExists(app_path('Services/UserService.php')); } - /** @test */ - public function it_can_append_after_the_search_value_in_a_file() + #[Test] + public function it_can_append_after_the_search_value_in_a_file(): void { $this->artisan(InstallCommand::class); @@ -33,8 +34,8 @@ public function isAdmin(): bool )); } - /** @test */ - public function it_can_install_composer_packages() + #[Test] + public function it_can_install_composer_packages(): void { $this->artisan(InstallCommand::class); @@ -42,8 +43,8 @@ public function it_can_install_composer_packages() Process::assertRan('composer require --dev my/dev-composer-package'); } - /** @test */ - public function it_can_throw_an_exception_when_no_package_json_file_is_present() + #[Test] + public function it_can_throw_an_exception_when_no_package_json_file_is_present(): void { File::delete(base_path('package.json')); $command = $this->artisan(InstallCommand::class); @@ -51,8 +52,8 @@ public function it_can_throw_an_exception_when_no_package_json_file_is_present() $command->expectsOutput("Could not find package.json file in the root of your project. Please create one using `npm init`"); } - /** @test */ - public function it_can_install_node_packages() + #[Test] + public function it_can_install_node_packages(): void { $this->artisan(InstallCommand::class);