Skip to content

Commit 9b202d2

Browse files
authored
Merge pull request #13 from ivinteractive/master
Support Laravel 10; Drop support for EOL PHP & Laravel versions
2 parents 2947800 + 3135a02 commit 9b202d2

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# InterFAX notification channel for Laravel 6.x/7.x/8.x/9.x
1+
# InterFAX notification channel for Laravel 9.x, 10.x
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/laravel-notification-channels/interfax.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/interfax)
44
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
@@ -142,4 +142,4 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
142142

143143
## License
144144

145-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
145+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@
1212
}
1313
],
1414
"require": {
15-
"php": "^7.2|^8.0",
16-
"illuminate/notifications": "^6.0|^7.0|^8.0|^9.0",
17-
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
18-
"interfax/interfax": "^1.1"
15+
"php": "^8.0",
16+
"illuminate/notifications": "^9.0|^10.0",
17+
"illuminate/support": "^9.0|^10.0",
18+
"interfax/interfax": "^2.0",
19+
"psr/log": "^2.0"
1920
},
2021
"require-dev": {
2122
"mockery/mockery": "^1.0",
2223
"mpdf/mpdf": "^8.0",
23-
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0",
24-
"phpunit/phpunit": "^8.0|^9.3.3"
24+
"orchestra/testbench": "^7.0|^8.0",
25+
"phpunit/phpunit": "^9.5.10|^10.0"
2526
},
2627
"autoload": {
2728
"psr-4": {

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
33
<coverage>
44
<include>
55
<directory suffix=".php">src/</directory>

tests/InterfaxChannelTest.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function setUp(): void
3737
/** @test */
3838
public function it_can_send_notification_with_a_single_file()
3939
{
40-
$this->interfax->shouldReceive('deliver')
40+
$this->interfax->expects('deliver')
4141
->once()
4242
->with([
4343
'faxNumber' => '12345678901',
@@ -57,7 +57,7 @@ public function it_can_send_notification_with_a_single_file()
5757
/** @test */
5858
public function it_can_send_notification_with_files()
5959
{
60-
$this->interfax->shouldReceive('deliver')
60+
$this->interfax->expects('deliver')
6161
->once()
6262
->with([
6363
'faxNumber' => '12345678901',
@@ -83,7 +83,7 @@ public function it_can_send_notification_with_files()
8383
/** @test */
8484
public function it_can_send_notification_pdf_as_stream()
8585
{
86-
$this->interfax->shouldReceive('deliver')
86+
$this->interfax->expects('deliver')
8787
->with(Mockery::on(function ($output) {
8888
if ($output['faxNumber'] !== '12345678901') {
8989
return false;
@@ -117,7 +117,7 @@ public function it_can_send_notification_html_as_stream()
117117

118118
app('filesystem')->put($filename, '<html><body><h1>Test file contents</h1></body></html>');
119119

120-
$this->interfax->shouldReceive('deliver')
120+
$this->interfax->expects('deliver')
121121
->with(Mockery::on(function ($output) {
122122
if ($output['faxNumber'] !== '12345678901') {
123123
return false;
@@ -153,15 +153,16 @@ public function it_can_return_early_when_no_fax_number_provided()
153153
public function it_can_refresh_the_file_response()
154154
{
155155
$this->resource
156-
->shouldReceive('refresh')
156+
->expects('refresh')
157+
->times(3)
157158
->andReturn((object) [
158159
'status' => -1,
159160
], (object) [
160161
'status' => 0,
161162
]);
162163

163164
$this->interfax
164-
->shouldReceive('deliver')
165+
->expects('deliver')
165166
->andReturn($this->resource);
166167

167168
$this->channel->send(new TestNotifiable, new TestNotificationWithRefresh);
@@ -175,15 +176,16 @@ public function it_can_throw_the_exception()
175176
$testResource = new TestResource;
176177

177178
$this->resource
178-
->shouldReceive('refresh')
179+
->expects('refresh')
180+
->times(2)
179181
->andReturn($testResource);
180182

181183
$this->resource
182-
->shouldReceive('attributes')
184+
->expects('attributes')
183185
->andReturn($testResource->attributes());
184186

185187
$this->interfax
186-
->shouldReceive('deliver')
188+
->expects('deliver')
187189
->andReturn($this->resource);
188190

189191
$this->channel->send(new TestNotifiable, new TestNotificationWithRefresh);

0 commit comments

Comments
 (0)