Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Add PHP 8.0 support #10

Merged
merged 4 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ composer.phar
composer.lock
.DS_Store
Thumbs.db
.phpunit.result.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
7 changes: 5 additions & 2 deletions tests/NotificationSlackChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -22,7 +23,7 @@ class NotificationSlackChannelTest extends TestCase
*/
private $guzzleHttp;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -31,7 +32,7 @@ protected function setUp()
$this->slackChannel = new SlackWebhookChannel($this->guzzleHttp);
}

public function tearDown()
public function tearDown(): void
{
m::close();
}
Expand All @@ -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);
Expand Down