Skip to content

Commit 307736c

Browse files
authored
Merge pull request #11 from kylestev/feature/add-laravel-5.5-support
Add support for Laravel 5.5
2 parents 6d61da3 + b11766c commit 307736c

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"require": {
1414
"php": ">=5.6.4",
1515
"guzzlehttp/guzzle": "~6.0",
16-
"illuminate/notifications": "5.3.*|5.4.*",
17-
"illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*"
16+
"illuminate/notifications": "5.3.*|5.4.*|5.5.*",
17+
"illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*"
1818
},
1919
"require-dev": {
2020
"mockery/mockery": "^0.9.5",
21-
"phpunit/phpunit": "4.*",
22-
"orchestra/testbench": "3.3.x-dev",
23-
"orchestra/database": "3.3.x-dev"
21+
"phpunit/phpunit": "4.*|~6.0",
22+
"orchestra/testbench": "3.3.x-dev|^3.5.0",
23+
"orchestra/database": "3.3.x-dev|^3.5.0"
2424
},
2525
"autoload": {
2626
"psr-4": {

tests/ChannelTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
namespace NotificationChannels\Webhook\Test;
44

5+
use Mockery;
56
use GuzzleHttp\Client;
67
use GuzzleHttp\Psr7\Response;
8+
use Orchestra\Testbench\TestCase;
79
use Illuminate\Notifications\Notification;
8-
use Mockery;
9-
use NotificationChannels\Webhook\Exceptions\CouldNotSendNotification;
1010
use NotificationChannels\Webhook\WebhookChannel;
1111
use NotificationChannels\Webhook\WebhookMessage;
12-
use Orchestra\Testbench\TestCase;
1312

1413
class ChannelTest extends TestCase
1514
{
@@ -33,6 +32,7 @@ public function it_can_send_a_notification()
3332
$channel = new WebhookChannel($client);
3433
$channel->send(new TestNotifiable(), new TestNotification());
3534
}
35+
3636
/** @test */
3737
public function it_can_send_a_notification_with_2xx_status()
3838
{
@@ -54,11 +54,12 @@ public function it_can_send_a_notification_with_2xx_status()
5454
$channel->send(new TestNotifiable(), new TestNotification());
5555
}
5656

57-
/** @test */
57+
/**
58+
* @expectedException NotificationChannels\Webhook\Exceptions\CouldNotSendNotification
59+
* @test
60+
*/
5861
public function it_throws_an_exception_when_it_could_not_send_the_notification()
5962
{
60-
$this->setExpectedException(CouldNotSendNotification::class);
61-
6263
$response = new Response(500);
6364
$client = Mockery::mock(Client::class);
6465
$client->shouldReceive('post')
@@ -82,7 +83,6 @@ public function routeNotificationForWebhook()
8283
}
8384
}
8485

85-
8686
class TestNotification extends Notification
8787
{
8888
public function toWebhook($notifiable)

tests/MessageTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
namespace NotificationChannels\Webhook\Test;
44

55
use Illuminate\Support\Arr;
6+
use Orchestra\Testbench\TestCase;
67
use NotificationChannels\Webhook\WebhookMessage;
78

8-
class MessageTest extends \PHPUnit_Framework_TestCase
9+
class MessageTest extends TestCase
910
{
1011
/** @var \NotificationChannels\Webhook\WebhookMessage */
1112
protected $message;

0 commit comments

Comments
 (0)