22
33namespace NotificationChannels \Twitter \Test ;
44
5+ use Mockery ;
6+ use stdClass ;
7+ use Orchestra \Testbench \TestCase ;
58use Abraham \TwitterOAuth \TwitterOAuth ;
69use Illuminate \Notifications \Notification ;
7- use Mockery ;
8- use NotificationChannels \Twitter \Exceptions \CouldNotSendNotification ;
9- use NotificationChannels \Twitter \Twitter ;
1010use NotificationChannels \Twitter \TwitterChannel ;
11- use NotificationChannels \Twitter \TwitterImage ;
1211use NotificationChannels \Twitter \TwitterStatusUpdate ;
13- use Orchestra \Testbench \TestCase ;
14- use stdClass ;
12+ use NotificationChannels \Twitter \Exceptions \CouldNotSendNotification ;
1513
1614class ChannelTest extends TestCase
1715{
18-
1916 /** @var Mockery\Mock */
2017 protected $ twitter ;
2118
@@ -73,7 +70,6 @@ public function it_throws_an_exception_when_it_could_not_send_the_notification()
7370 $ twitterResponse = new stdClass ;
7471 $ twitterResponse ->errors [] = $ messageObject ;
7572
76-
7773 $ this ->twitter ->shouldReceive ('post ' )->once ()->with ('statuses/update ' ,
7874 ['status ' => 'Laravel Notification Channels are awesome! ' ]);
7975
@@ -87,10 +83,8 @@ public function it_throws_an_exception_when_it_could_not_send_the_notification()
8783 }
8884}
8985
90-
9186class TestNotifiable
9287{
93-
9488 use \Illuminate \Notifications \Notifiable;
9589
9690 /**
@@ -104,7 +98,6 @@ public function routeNotificationForTwitter()
10498
10599class TestNotification extends Notification
106100{
107-
108101 public function toTwitter ($ notifiable )
109102 {
110103 return new TwitterStatusUpdate ('Laravel Notification Channels are awesome! ' );
@@ -113,7 +106,6 @@ public function toTwitter($notifiable)
113106
114107class TestNotificationWithImage extends Notification
115108{
116-
117109 public function toTwitter ($ notifiable )
118110 {
119111 return (new TwitterStatusUpdate ('Laravel Notification Channels are awesome! ' ))->withImage (public_path ('image.png ' ));
0 commit comments