Skip to content

Commit 6e7d768

Browse files
fix alphabetical order of checks
1 parent 1226c4c commit 6e7d768

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

tests/Functional/NotifierCest.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,59 +8,59 @@
88

99
final class NotifierCest
1010
{
11-
public function dontSeeNotificationIsSent(FunctionalTester $I)
11+
public function assertNotificationSubjectContains(FunctionalTester $I)
1212
{
13-
$I->registerUser('john_doe@gmail.com', '123456', followRedirects: false);
14-
// There is already an account with this notification
15-
$I->dontSeeNotificationIsSent();
13+
$I->registerUser('jane_doe@gmail.com', '123456', followRedirects: false);
14+
$notification = $I->getNotifierMessage();
15+
$I->assertNotificationSubjectContains($notification, 'created!');
1616
}
1717

18-
public function grabLastSentNotification(FunctionalTester $I)
18+
public function assertNotificationSubjectNotContains(FunctionalTester $I)
1919
{
2020
$I->registerUser('[email protected]', '123456', followRedirects: false);
21-
$notification = $I->grabLastSentNotification();
22-
$I->assertSame('Account created!', $notification->getSubject());
21+
$notification = $I->getNotifierMessage();
22+
$I->assertNotificationSubjectNotContains($notification, 'Account not created!');
2323
}
2424

25-
public function grabSentNotifications(FunctionalTester $I)
25+
public function assertNotificationTransportIsEqual(FunctionalTester $I)
2626
{
2727
$I->registerUser('[email protected]', '123456', followRedirects: false);
28-
$notifications = $I->grabSentNotifications();
29-
$subject = $notifications[0]->getSubject();
30-
$I->assertSame('Account created!', $subject);
28+
$notification = $I->getNotifierMessage();
29+
$I->assertNotificationTransportIsEqual($notification);
3130
}
3231

33-
public function seeNotificationIsSent(FunctionalTester $I)
32+
public function assertNotificationTransportIsNotEqual(FunctionalTester $I)
3433
{
3534
$I->registerUser('[email protected]', '123456', followRedirects: false);
36-
$I->seeNotificationIsSent();
35+
$notification = $I->getNotifierMessage();
36+
$I->assertNotificationTransportIsNotEqual($notification, 'chat');
3737
}
3838

39-
public function assertNotificationSubjectContains(FunctionalTester $I)
39+
public function dontSeeNotificationIsSent(FunctionalTester $I)
4040
{
41-
$I->registerUser('jane_doe@gmail.com', '123456', followRedirects: false);
42-
$notification = $I->getNotifierMessage();
43-
$I->assertNotificationSubjectContains($notification, 'created!');
41+
$I->registerUser('john_doe@gmail.com', '123456', followRedirects: false);
42+
// There is already an account with this notification
43+
$I->dontSeeNotificationIsSent();
4444
}
4545

46-
public function assertNotificationSubjectNotContains(FunctionalTester $I)
46+
public function grabLastSentNotification(FunctionalTester $I)
4747
{
4848
$I->registerUser('[email protected]', '123456', followRedirects: false);
49-
$notification = $I->getNotifierMessage();
50-
$I->assertNotificationSubjectNotContains($notification, 'Account not created!');
49+
$notification = $I->grabLastSentNotification();
50+
$I->assertSame('Account created!', $notification->getSubject());
5151
}
5252

53-
public function assertNotificationTransportIsEqual(FunctionalTester $I)
53+
public function grabSentNotifications(FunctionalTester $I)
5454
{
5555
$I->registerUser('[email protected]', '123456', followRedirects: false);
56-
$notification = $I->getNotifierMessage();
57-
$I->assertNotificationTransportIsEqual($notification);
56+
$notifications = $I->grabSentNotifications();
57+
$subject = $notifications[0]->getSubject();
58+
$I->assertSame('Account created!', $subject);
5859
}
5960

60-
public function assertNotificationTransportIsNotEqual(FunctionalTester $I)
61+
public function seeNotificationIsSent(FunctionalTester $I)
6162
{
6263
$I->registerUser('[email protected]', '123456', followRedirects: false);
63-
$notification = $I->getNotifierMessage();
64-
$I->assertNotificationTransportIsNotEqual($notification, 'chat');
64+
$I->seeNotificationIsSent();
6565
}
6666
}

0 commit comments

Comments
 (0)