7
7
use Illuminated \Console \Tests \TestCase ;
8
8
use Monolog \Level ;
9
9
use Monolog \LogRecord ;
10
+ use PHPUnit \Framework \Attributes \Test ;
10
11
11
12
class MonologHtmlFormatterTest extends TestCase
12
13
{
13
- /** @test */
14
- public function it_properly_formats_debug_records ()
14
+ #[Test]
15
+ public function it_properly_formats_debug_records (): void
15
16
{
16
17
$ record = $ this ->generateRecord ('Debug! ' , Level::Debug);
17
18
18
19
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
19
20
}
20
21
21
- /** @test */
22
- public function it_properly_formats_info_records ()
22
+ #[Test]
23
+ public function it_properly_formats_info_records (): void
23
24
{
24
25
$ record = $ this ->generateRecord ('Info! ' , Level::Info);
25
26
26
27
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
27
28
}
28
29
29
- /** @test */
30
- public function it_properly_formats_notice_records ()
30
+ #[Test]
31
+ public function it_properly_formats_notice_records (): void
31
32
{
32
33
$ record = $ this ->generateRecord ('Notice! ' , Level::Notice);
33
34
34
35
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
35
36
}
36
37
37
- /** @test */
38
- public function it_properly_formats_warning_records ()
38
+ #[Test]
39
+ public function it_properly_formats_warning_records (): void
39
40
{
40
41
$ record = $ this ->generateRecord ('Warning! ' , Level::Warning);
41
42
42
43
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
43
44
}
44
45
45
- /** @test */
46
- public function it_properly_formats_error_records ()
46
+ #[Test]
47
+ public function it_properly_formats_error_records (): void
47
48
{
48
49
$ record = $ this ->generateRecord ('Error! ' , Level::Error);
49
50
50
51
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
51
52
}
52
53
53
- /** @test */
54
- public function it_properly_formats_critical_records ()
54
+ #[Test]
55
+ public function it_properly_formats_critical_records (): void
55
56
{
56
57
$ record = $ this ->generateRecord ('Critical! ' , Level::Critical);
57
58
58
59
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
59
60
}
60
61
61
- /** @test */
62
- public function it_properly_formats_alert_records ()
62
+ #[Test]
63
+ public function it_properly_formats_alert_records (): void
63
64
{
64
65
$ record = $ this ->generateRecord ('Alert! ' , Level::Alert);
65
66
66
67
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
67
68
}
68
69
69
- /** @test */
70
- public function it_properly_formats_emergency_records ()
70
+ #[Test]
71
+ public function it_properly_formats_emergency_records (): void
71
72
{
72
73
$ record = $ this ->generateRecord ('Emergency! ' , Level::Emergency);
73
74
74
75
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
75
76
}
76
77
77
- /** @test */
78
- public function it_properly_formats_records_with_array_context ()
78
+ #[Test]
79
+ public function it_properly_formats_records_with_array_context (): void
79
80
{
80
81
$ record = $ this ->generateRecord ('Record with array context! ' , Level::Warning, [
81
82
'foo ' => 'bar ' ,
@@ -87,8 +88,8 @@ public function it_properly_formats_records_with_array_context()
87
88
$ this ->assertFormatterGeneratesExpectedOutput ($ record );
88
89
}
89
90
90
- /** @test */
91
- public function it_has_no_environment_subtitle_for_production ()
91
+ #[Test]
92
+ public function it_has_no_environment_subtitle_for_production (): void
92
93
{
93
94
$ this ->emulateProduction ();
94
95
$ record = $ this ->generateRecord ('Notice! ' , Level::Notice);
0 commit comments