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

Commit

Permalink
Merge pull request #10 from tomwelch/php8
Browse files Browse the repository at this point in the history
Add PHP 8.0 support
  • Loading branch information
nathanheffley authored Dec 1, 2020
2 parents f304312 + 7414b7c commit dc0795c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
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

0 comments on commit dc0795c

Please sign in to comment.