Skip to content

Commit 04e07b2

Browse files
freekmurzeclaude
andcommitted
Add #[Test] attributes for PHPUnit 12 compatibility
PHPUnit 12 dropped support for @test docblock annotations. Replace them with #[Test] attributes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ce623a6 commit 04e07b2

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/TailCommandTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
namespace Spatie\Tail\Tests;
44

5+
use PHPUnit\Framework\Attributes\Test;
6+
57
class TailCommandTest extends TestCase
68
{
7-
/** @test */
9+
#[Test]
810
public function it_will_throw_an_exception_if_the_given_environment_is_not_configured()
911
{
1012
$this->expectExceptionMessageMatches('/^No configuration set/');
@@ -14,7 +16,7 @@ public function it_will_throw_an_exception_if_the_given_environment_is_not_confi
1416
]);
1517
}
1618

17-
/** @test */
19+
#[Test]
1820
public function the_tail_command_is_correct()
1921
{
2022
$this
@@ -24,7 +26,7 @@ public function the_tail_command_is_correct()
2426
->expectsOutput('\\tail -f -n 0 "`\\ls -t | \\head -1`"');
2527
}
2628

27-
/** @test */
29+
#[Test]
2830
public function the_tail_command_with_file_is_correct()
2931
{
3032
$this
@@ -35,7 +37,7 @@ public function the_tail_command_with_file_is_correct()
3537
->expectsOutput('\\tail -f -n 0 "file.log"');
3638
}
3739

38-
/** @test */
40+
#[Test]
3941
public function the_command_when_grepping_is_correct()
4042
{
4143
$this

0 commit comments

Comments
 (0)