22
22
*/
23
23
trait NotificationAssertionsTrait
24
24
{
25
- public static function assertNotificationCount (int $ count , string $ transport = null , string $ message = '' ): void
25
+ public static function assertNotificationCount (int $ count , string $ transportName = null , string $ message = '' ): void
26
26
{
27
- self ::assertThat (self ::getNotificationEvents (), new NotifierConstraint \NotificationCount ($ count , $ transport ), $ message );
27
+ self ::assertThat (self ::getNotificationEvents (), new NotifierConstraint \NotificationCount ($ count , $ transportName ), $ message );
28
28
}
29
29
30
- public static function assertQueuedNotificationCount (int $ count , string $ transport = null , string $ message = '' ): void
30
+ public static function assertQueuedNotificationCount (int $ count , string $ transportName = null , string $ message = '' ): void
31
31
{
32
- self ::assertThat (self ::getMessageMailerEvents (), new NotifierConstraint \NotificationCount ($ count , $ transport , true ), $ message );
32
+ self ::assertThat (self ::getMessageMailerEvents (), new NotifierConstraint \NotificationCount ($ count , $ transportName , true ), $ message );
33
33
}
34
34
35
35
public static function assertNotificationIsQueued (MessageEvent $ event , string $ message = '' ): void
@@ -42,50 +42,50 @@ public static function assertNotificationIsNotQueued(MessageEvent $event, string
42
42
self ::assertThat ($ event , new LogicalNot (new NotifierConstraint \NotificationIsQueued ()), $ message );
43
43
}
44
44
45
- public static function assertNotificationSubjectContains (MessageInterface $ messageObject , string $ text , string $ message = '' ): void
45
+ public static function assertNotificationSubjectContains (MessageInterface $ notification , string $ text , string $ message = '' ): void
46
46
{
47
- self ::assertThat ($ messageObject , new NotifierConstraint \NotificationSubjectContains ($ text ), $ message );
47
+ self ::assertThat ($ notification , new NotifierConstraint \NotificationSubjectContains ($ text ), $ message );
48
48
}
49
49
50
- public static function assertNotificationSubjectNotContains (MessageInterface $ messageObject , string $ text , string $ message = '' ): void
50
+ public static function assertNotificationSubjectNotContains (MessageInterface $ notification , string $ text , string $ message = '' ): void
51
51
{
52
- self ::assertThat ($ messageObject , new LogicalNot (new NotifierConstraint \NotificationSubjectContains ($ text )), $ message );
52
+ self ::assertThat ($ notification , new LogicalNot (new NotifierConstraint \NotificationSubjectContains ($ text )), $ message );
53
53
}
54
54
55
- public static function assertNotificationTransportIsEqual (MessageInterface $ messageObject , string $ text , string $ message = '' ): void
55
+ public static function assertNotificationTransportIsEqual (MessageInterface $ notification , string $ transportName , string $ message = '' ): void
56
56
{
57
- self ::assertThat ($ messageObject , new NotifierConstraint \NotificationTransportIsEqual ($ text ), $ message );
57
+ self ::assertThat ($ notification , new NotifierConstraint \NotificationTransportIsEqual ($ transportName ), $ message );
58
58
}
59
59
60
- public static function assertNotificationTransportIsNotEqual (MessageInterface $ messageObject , string $ text , string $ message = '' ): void
60
+ public static function assertNotificationTransportIsNotEqual (MessageInterface $ notification , string $ transportName , string $ message = '' ): void
61
61
{
62
- self ::assertThat ($ messageObject , new LogicalNot (new NotifierConstraint \NotificationTransportIsEqual ($ text )), $ message );
62
+ self ::assertThat ($ notification , new LogicalNot (new NotifierConstraint \NotificationTransportIsEqual ($ transportName )), $ message );
63
63
}
64
64
65
65
/**
66
66
* @return MessageEvent[]
67
67
*/
68
- public static function getNotifierEvents (string $ transport = null ): array
68
+ public static function getNotifierEvents (string $ transportName = null ): array
69
69
{
70
- return self ::getNotificationEvents ()->getEvents ($ transport );
70
+ return self ::getNotificationEvents ()->getEvents ($ transportName );
71
71
}
72
72
73
- public static function getNotifierEvent (int $ index = 0 , string $ transport = null ): ?MessageEvent
73
+ public static function getNotifierEvent (int $ index = 0 , string $ transportName = null ): ?MessageEvent
74
74
{
75
- return self ::getNotifierEvents ($ transport )[$ index ] ?? null ;
75
+ return self ::getNotifierEvents ($ transportName )[$ index ] ?? null ;
76
76
}
77
77
78
78
/**
79
79
* @return MessageInterface[]
80
80
*/
81
- public static function getNotifierMessages (string $ transport = null ): array
81
+ public static function getNotifierMessages (string $ transportName = null ): array
82
82
{
83
- return self ::getNotificationEvents ()->getMessages ($ transport );
83
+ return self ::getNotificationEvents ()->getMessages ($ transportName );
84
84
}
85
85
86
- public static function getNotifierMessage (int $ index = 0 , string $ transport = null ): ?MessageInterface
86
+ public static function getNotifierMessage (int $ index = 0 , string $ transportName = null ): ?MessageInterface
87
87
{
88
- return self ::getNotifierMessages ($ transport )[$ index ] ?? null ;
88
+ return self ::getNotifierMessages ($ transportName )[$ index ] ?? null ;
89
89
}
90
90
91
91
public static function getNotificationEvents (): NotificationEvents
0 commit comments