8
8
use PhpLlm \LlmChain \Message \MessageBag ;
9
9
use PHPUnit \Framework \Attributes \CoversClass ;
10
10
use PHPUnit \Framework \Attributes \Small ;
11
+ use PHPUnit \Framework \Attributes \Test ;
11
12
use PHPUnit \Framework \Attributes \UsesClass ;
12
13
use PHPUnit \Framework \TestCase ;
13
14
16
17
#[Small]
17
18
final class MessageBagTest extends TestCase
18
19
{
19
- public function testGetSystemMessage (): void
20
+ #[Test]
21
+ public function getSystemMessage (): void
20
22
{
21
23
$ messageBag = new MessageBag (
22
24
Message::forSystem ('My amazing system prompt. ' ),
@@ -29,7 +31,8 @@ public function testGetSystemMessage(): void
29
31
self ::assertSame ('My amazing system prompt. ' , $ systemMessage ->content );
30
32
}
31
33
32
- public function testGetSystemMessageWithoutSystemMessage (): void
34
+ #[Test]
35
+ public function getSystemMessageWithoutSystemMessage (): void
33
36
{
34
37
$ messageBag = new MessageBag (
35
38
Message::ofAssistant ('It is time to sleep. ' ),
@@ -39,7 +42,8 @@ public function testGetSystemMessageWithoutSystemMessage(): void
39
42
self ::assertNull ($ messageBag ->getSystemMessage ());
40
43
}
41
44
42
- public function testWith (): void
45
+ #[Test]
46
+ public function with (): void
43
47
{
44
48
$ messageBag = new MessageBag (
45
49
Message::forSystem ('My amazing system prompt. ' ),
@@ -55,7 +59,8 @@ public function testWith(): void
55
59
self ::assertSame ('It is time to wake up. ' , $ newMessageBag [3 ]->content );
56
60
}
57
61
58
- public function testWithoutSystemMessage (): void
62
+ #[Test]
63
+ public function withoutSystemMessage (): void
59
64
{
60
65
$ messageBag = new MessageBag (
61
66
Message::forSystem ('My amazing system prompt. ' ),
@@ -70,7 +75,8 @@ public function testWithoutSystemMessage(): void
70
75
self ::assertSame ('It is time to sleep. ' , $ newMessageBag [0 ]->content );
71
76
}
72
77
73
- public function testPrepend (): void
78
+ #[Test]
79
+ public function prepend (): void
74
80
{
75
81
$ messageBag = new MessageBag (
76
82
Message::ofAssistant ('It is time to sleep. ' ),
@@ -85,7 +91,8 @@ public function testPrepend(): void
85
91
self ::assertSame ('My amazing system prompt. ' , $ newMessageBag [0 ]->content );
86
92
}
87
93
88
- public function testJsonSerialize (): void
94
+ #[Test]
95
+ public function jsonSerialize (): void
89
96
{
90
97
$ messageBag = new MessageBag (
91
98
Message::forSystem ('My amazing system prompt. ' ),
0 commit comments