66use MarkWalet \Changelog \Exceptions \DirectoryNotFoundException ;
77use MarkWalet \Changelog \Exceptions \FileNotFoundException ;
88use MarkWalet \Changelog \Exceptions \VersionAlreadyExistsException ;
9+ use PHPUnit \Framework \Attributes \Test ;
910
1011trait ReleaseAdapterTests
1112{
@@ -21,8 +22,8 @@ trait ReleaseAdapterTests
2122 */
2223 abstract public function adapter (): ReleaseAdapter ;
2324
24- /** @test */
25- public function it_can_see_if_a_release_exists ()
25+ #[Test]
26+ public function it_can_see_if_a_release_exists (): void
2627 {
2728 $ adapter = $ this ->adapter ();
2829
@@ -33,8 +34,8 @@ public function it_can_see_if_a_release_exists()
3334 $ this ->assertFalse ($ resultB );
3435 }
3536
36- /** @test */
37- public function it_can_read_a_release ()
37+ #[Test]
38+ public function it_can_read_a_release (): void
3839 {
3940 $ adapter = $ this ->adapter ();
4041
@@ -53,8 +54,8 @@ public function it_can_read_a_release()
5354 $ this ->assertEquals ('Removed unused trait. ' , $ changes [3 ]->message ());
5455 }
5556
56- /** @test */
57- public function it_can_read_changes_of_a_nested_release ()
57+ #[Test]
58+ public function it_can_read_changes_of_a_nested_release (): void
5859 {
5960 $ adapter = $ this ->adapter ();
6061
@@ -71,8 +72,8 @@ public function it_can_read_changes_of_a_nested_release()
7172 $ this ->assertEquals ('Removed unused trait. ' , $ changes [2 ]->message ());
7273 }
7374
74- /** @test */
75- public function it_can_list_all_releases ()
75+ #[Test]
76+ public function it_can_list_all_releases (): void
7677 {
7778 $ adapter = $ this ->adapter ();
7879
@@ -87,26 +88,26 @@ public function it_can_list_all_releases()
8788 $ this ->assertCount (2 , $ releases [2 ]->changes ());
8889 }
8990
90- /** @test */
91- public function it_throws_an_exception_when_the_release_is_not_found ()
91+ #[Test]
92+ public function it_throws_an_exception_when_the_release_is_not_found (): void
9293 {
9394 $ this ->expectException (FileNotFoundException::class);
9495 $ adapter = $ this ->adapter ();
9596
9697 $ adapter ->read ('non-existing ' , 'version ' );
9798 }
9899
99- /** @test */
100- public function it_throws_an_exception_when_the_working_directory_is_not_found ()
100+ #[Test]
101+ public function it_throws_an_exception_when_the_working_directory_is_not_found (): void
101102 {
102103 $ this ->expectException (DirectoryNotFoundException::class);
103104 $ adapter = $ this ->adapter ();
104105
105106 $ adapter ->all ('non-existing ' );
106107 }
107108
108- /** @test */
109- public function it_throws_an_exception_when_the_version_already_exists ()
109+ #[Test]
110+ public function it_throws_an_exception_when_the_version_already_exists (): void
110111 {
111112 $ this ->expectException (VersionAlreadyExistsException::class);
112113 $ adapter = $ this ->adapter ();
0 commit comments