diff --git a/.gitignore b/.gitignore index 0ae7f26..ee9bd74 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.phar composer.lock .DS_Store Thumbs.db +.phpunit.result.cache diff --git a/composer.json b/composer.json index 977fad9..9ccc3b3 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^7.1.3", + "php": "^7.1.3|^8.0", "guzzlehttp/guzzle": "^6.0|^7.0", "laravel/slack-notification-channel": "^2.0" }, diff --git a/tests/NotificationSlackChannelTest.php b/tests/NotificationSlackChannelTest.php index ce8f71b..1a78387 100644 --- a/tests/NotificationSlackChannelTest.php +++ b/tests/NotificationSlackChannelTest.php @@ -4,6 +4,7 @@ use Mockery as m; use GuzzleHttp\Client; +use GuzzleHttp\Psr7\Response; use PHPUnit\Framework\TestCase; use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notification; @@ -22,7 +23,7 @@ class NotificationSlackChannelTest extends TestCase */ private $guzzleHttp; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -31,7 +32,7 @@ protected function setUp() $this->slackChannel = new SlackWebhookChannel($this->guzzleHttp); } - public function tearDown() + public function tearDown(): void { m::close(); } @@ -46,6 +47,8 @@ public function testCorrectPayloadIsSentToSlack(Notification $notification, arra $this->guzzleHttp->shouldReceive('post')->andReturnUsing(function ($argUrl, $argPayload) use ($payload) { $this->assertEquals('url', $argUrl); $this->assertEquals($payload, $argPayload); + + return new Response(); }); $this->slackChannel->send(new NotificationSlackChannelTestNotifiable, $notification);