@@ -37,9 +37,10 @@ public function published_articles_can_be_shared_on_twitter()
3737 PostArticleToTwitterNotification::class,
3838 function ($ notification , $ channels , $ notifiable ) use ($ article ) {
3939 $ tweet = $ notification ->generateTweet ();
40+
4041 return Str::contains ($ tweet , 'My First Article ' ) &&
4142 Str::contains ($ tweet , route ('articles.show ' , $ article ->slug ()));
42- }
43+ },
4344 );
4445
4546 $ this ->assertTrue ($ article ->fresh ()->isShared ());
@@ -63,9 +64,9 @@ public function articles_are_shared_with_twitter_handle()
6364 Notification::assertSentTo (
6465 new AnonymousNotifiable (),
6566 PostArticleToTwitterNotification::class,
66- function ($ notification , $ channels , $ notifiable ) use ( $ user ) {
67+ function ($ notification , $ channels , $ notifiable ) {
6768 return Str::contains ($ notification ->generateTweet (), '@_joedixon ' );
68- }
69+ },
6970 );
7071 }
7172
@@ -87,9 +88,9 @@ public function articles_are_shared_with_name_when_no_twitter_handle()
8788 Notification::assertSentTo (
8889 new AnonymousNotifiable (),
8990 PostArticleToTwitterNotification::class,
90- function ($ notification , $ channels , $ notifiable ) use ( $ user ) {
91+ function ($ notification , $ channels , $ notifiable ) {
9192 return Str::contains ($ notification ->generateTweet (), 'Joe Dixon ' );
92- }
93+ },
9394 );
9495 }
9596
0 commit comments