55use Illuminate \Config \Repository ;
66use MarkWalet \Packagist \Facades \Packagist ;
77use MarkWalet \Packagist \PackagistServiceProvider ;
8+ use PHPUnit \Framework \Attributes \Test ;
89use Spatie \Packagist \PackagistClient ;
910use Spatie \Packagist \PackagistUrlGenerator ;
1011
1112class PackagistServiceProviderTest extends LaravelTestCase
1213{
13- /** @test */
14- public function it_binds_a_packagist_client_to_the_application ()
14+ #[Test]
15+ public function it_binds_a_packagist_client_to_the_application (): void
1516 {
1617 $ bindings = $ this ->app ->getBindings ();
1718 $ this ->assertArrayHasKey (PackagistClient::class, $ bindings );
@@ -20,8 +21,8 @@ public function it_binds_a_packagist_client_to_the_application()
2021 $ this ->assertInstanceOf (PackagistClient::class, $ result );
2122 }
2223
23- /** @test */
24- public function it_binds_a_url_generator_to_the_application ()
24+ #[Test]
25+ public function it_binds_a_url_generator_to_the_application (): void
2526 {
2627 $ bindings = $ this ->app ->getBindings ();
2728 $ this ->assertArrayHasKey (PackagistUrlGenerator::class, $ bindings );
@@ -30,8 +31,8 @@ public function it_binds_a_url_generator_to_the_application()
3031 $ this ->assertInstanceOf (PackagistUrlGenerator::class, $ result );
3132 }
3233
33- /** @test */
34- public function the_service_provider_only_loads_when_one_of_the_bound_classes_should_be_injected ()
34+ #[Test]
35+ public function the_service_provider_only_loads_when_one_of_the_bound_classes_should_be_injected (): void
3536 {
3637 $ provider = new PackagistServiceProvider ($ this ->app );
3738
@@ -43,8 +44,8 @@ public function the_service_provider_only_loads_when_one_of_the_bound_classes_sh
4344 ], $ result );
4445 }
4546
46- /** @test */
47- public function it_registers_a_facade ()
47+ #[Test]
48+ public function it_registers_a_facade (): void
4849 {
4950 $ this ->app ->bind (PackagistClient::class, function () {
5051 $ client = $ this ->getMockBuilder (PackagistClient::class)
@@ -67,8 +68,8 @@ public function it_registers_a_facade()
6768 $ this ->assertEquals (['result ' => 'ok ' ], $ result );
6869 }
6970
70- /** @test */
71- public function it_uses_the_default_configuration_when_no_url_is_set ()
71+ #[Test]
72+ public function it_uses_the_default_configuration_when_no_url_is_set (): void
7273 {
7374 /** @var PackagistUrlGenerator $generator */
7475 $ generator = $ this ->app ->make (PackagistUrlGenerator::class);
@@ -80,8 +81,8 @@ public function it_uses_the_default_configuration_when_no_url_is_set()
8081 $ this ->assertEquals ('https://repo.packagist.org/test.json ' , $ repoResult );
8182 }
8283
83- /** @test */
84- public function it_can_override_the_url_configuration ()
84+ #[Test]
85+ public function it_can_override_the_url_configuration (): void
8586 {
8687 /** @var Repository $config */
8788 $ config = $ this ->app ['config ' ];
0 commit comments