Skip to content

Commit e6b5786

Browse files
committed
Drop support for PHP 8.0, Laravel 9
1 parent e3753cc commit e6b5786

File tree

5 files changed

+24
-45
lines changed

5 files changed

+24
-45
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: true
1212
matrix:
13-
php: [8.0, 8.1, 8.2, 8.3]
13+
php: [8.1, 8.2, 8.3]
1414

1515
name: Tests on PHP ${{ matrix.php }} - ${{ matrix.stability }}
1616

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
}
1313
],
1414
"require": {
15-
"php": "^8.0",
16-
"illuminate/notifications": "^9.0|^10.0|^11.0",
17-
"illuminate/support": "^9.0|^10.0|^11.0",
15+
"php": "^8.1",
16+
"illuminate/notifications": "^10.0|^11.0",
17+
"illuminate/support": "^10.0|^11.0",
1818
"interfax/interfax": "^2.0",
1919
"psr/log": "^2.0"
2020
},
2121
"require-dev": {
2222
"mockery/mockery": "^1.0",
2323
"mpdf/mpdf": "^8.0",
24-
"orchestra/testbench": "^7.0|^8.0|^9.0",
24+
"orchestra/testbench": "^8.0|^9.0",
2525
"phpstan/phpstan": "^1.9",
26-
"phpunit/phpunit": "^9.5.10|^10.0|^11.0"
26+
"phpunit/phpunit": "^10.0|^11.0"
2727
},
2828
"autoload": {
2929
"psr-4": {

tests/CouldNotSendNotificationExceptionTest.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace NotificationChannels\Interfax\Test;
44

5-
use PHPUnit\Framework\Attributes\Test;
65
use NotificationChannels\Interfax\Exceptions\CouldNotSendNotification;
76
use NotificationChannels\Interfax\InterfaxMessage;
87

@@ -20,8 +19,7 @@ public function setUp(): void
2019
->file('test-file.pdf');
2120
}
2221

23-
#[Test]
24-
public function it_can_get_the_exception_user()
22+
public function test_get_the_exception_user()
2523
{
2624
$exception = CouldNotSendNotification::serviceRespondedWithAnError($this->message, [
2725
'status' => 500,
@@ -31,8 +29,7 @@ public function it_can_get_the_exception_user()
3129
$this->assertInstanceOf(TestNotifiable::class, $exception->getUser());
3230
}
3331

34-
#[Test]
35-
public function it_can_get_the_exception_metadata()
32+
public function test_get_the_exception_metadata()
3633
{
3734
$exception = CouldNotSendNotification::serviceRespondedWithAnError($this->message, [
3835
'status' => 500,
@@ -42,8 +39,7 @@ public function it_can_get_the_exception_metadata()
4239
$this->assertSame('Some sample metadata.', $exception->getMetadata()['key']);
4340
}
4441

45-
#[Test]
46-
public function it_can_get_the_default_exception_message()
42+
public function test_get_the_default_exception_message()
4743
{
4844
$exception = CouldNotSendNotification::serviceRespondedWithAnError($this->message, [
4945
'status' => 500,
@@ -53,8 +49,7 @@ public function it_can_get_the_default_exception_message()
5349
$this->assertSame('The fax failed to send via InterFAX.', $exception->getMessage());
5450
}
5551

56-
#[Test]
57-
public function it_can_get_a_custom_exception_message()
52+
public function test_get_a_custom_exception_message()
5853
{
5954
$exceptionMessage = 'This is a test.';
6055

@@ -66,8 +61,7 @@ public function it_can_get_a_custom_exception_message()
6661
$this->assertSame($exceptionMessage, $exception->getMessage());
6762
}
6863

69-
#[Test]
70-
public function it_can_get_the_exception_attributes()
64+
public function test_get_the_exception_attributes()
7165
{
7266
$exception = CouldNotSendNotification::serviceRespondedWithAnError($this->message, [
7367
'status' => 500,

tests/InterfaxChannelTest.php

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace NotificationChannels\Interfax\Test;
44

55
use Illuminate\Notifications\Notification;
6-
use PHPUnit\Framework\Attributes\Test;
76
use Interfax\Client as InterfaxClient;
87
use Interfax\Resource as InterfaxResource;
98
use Mockery;
@@ -36,8 +35,7 @@ public function setUp(): void
3635
$this->channel = new InterfaxChannel($this->interfax);
3736
}
3837

39-
#[Test]
40-
public function it_can_send_notification_with_a_single_file()
38+
public function test_send_notification_with_a_single_file()
4139
{
4240
$this->interfax->expects('deliver')
4341
->once()
@@ -56,8 +54,7 @@ public function it_can_send_notification_with_a_single_file()
5654
$this->channel->send(new TestNotifiable, new TestNotificationWithSingleFile);
5755
}
5856

59-
#[Test]
60-
public function it_can_send_notification_with_files()
57+
public function test_send_notification_with_files()
6158
{
6259
$this->interfax->expects('deliver')
6360
->once()
@@ -82,8 +79,7 @@ public function it_can_send_notification_with_files()
8279
$this->channel->send(new TestNotifiable, new TestNotificationWithFiles);
8380
}
8481

85-
#[Test]
86-
public function it_can_send_notification_pdf_as_stream()
82+
public function test_send_notification_pdf_as_stream()
8783
{
8884
$this->interfax->expects('deliver')
8985
->with(Mockery::on(function ($output) {
@@ -111,8 +107,7 @@ public function it_can_send_notification_pdf_as_stream()
111107
$this->channel->send(new TestNotifiable, new TestNotificationAsStreamPdf);
112108
}
113109

114-
#[Test]
115-
public function it_can_send_notification_html_as_stream()
110+
public function test_send_notification_html_as_stream()
116111
{
117112
$filename = 'test-file.html';
118113
$this->addFile($filename);
@@ -145,14 +140,12 @@ public function it_can_send_notification_html_as_stream()
145140
$this->channel->send(new TestNotifiable, new TestNotificationAsStreamHtml);
146141
}
147142

148-
#[Test]
149-
public function it_can_return_early_when_no_fax_number_provided()
143+
public function test_return_early_when_no_fax_number_provided()
150144
{
151145
$this->assertNull($this->channel->send(new TestNotifiableNotSendable, new TestNotificationWithFiles));
152146
}
153147

154-
#[Test]
155-
public function it_can_refresh_the_file_response()
148+
public function test_refresh_the_file_response()
156149
{
157150
$this->resource
158151
->expects('refresh')
@@ -170,8 +163,7 @@ public function it_can_refresh_the_file_response()
170163
$this->channel->send(new TestNotifiable, new TestNotificationWithRefresh);
171164
}
172165

173-
#[Test]
174-
public function it_can_throw_the_exception()
166+
public function test_throw_the_exception()
175167
{
176168
$this->expectException(CouldNotSendNotification::class);
177169

tests/InterfaxMessageTest.php

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

33
namespace NotificationChannels\Interfax\Test;
44

5-
use PHPUnit\Framework\Attributes\Test;
65
use NotificationChannels\Interfax\InterfaxMessage;
76

87
class InterfaxMessageTest extends TestCase
98
{
10-
#[Test]
11-
public function it_should_check_the_status_via_refresh()
9+
public function test_check_the_status_via_refresh()
1210
{
1311
$message = (new InterfaxMessage)
1412
->checkStatus()
@@ -18,8 +16,7 @@ public function it_should_check_the_status_via_refresh()
1816
$this->assertTrue($message->shouldCheckStatus());
1917
}
2018

21-
#[Test]
22-
public function it_should_not_check_the_status_via_refresh_manual()
19+
public function test_not_check_the_status_via_refresh_manual()
2320
{
2421
$message = (new InterfaxMessage)
2522
->checkStatus(false)
@@ -29,8 +26,7 @@ public function it_should_not_check_the_status_via_refresh_manual()
2926
$this->assertFalse($message->shouldCheckStatus());
3027
}
3128

32-
#[Test]
33-
public function it_should_not_check_the_status_via_refresh_default()
29+
public function test_not_check_the_status_via_refresh_default()
3430
{
3531
$message = (new InterfaxMessage)
3632
->user(new TestNotifiable)
@@ -39,8 +35,7 @@ public function it_should_not_check_the_status_via_refresh_default()
3935
$this->assertFalse($message->shouldCheckStatus());
4036
}
4137

42-
#[Test]
43-
public function it_should_set_the_file_chunk_size_filename()
38+
public function test_set_the_file_chunk_size_filename()
4439
{
4540
$this->increaseChunkSize();
4641

@@ -54,8 +49,7 @@ public function it_should_set_the_file_chunk_size_filename()
5449
$this->assertSame($this->chunkSize, $this->getChunkSize($delivery));
5550
}
5651

57-
#[Test]
58-
public function it_should_set_the_file_chunk_size_file_array()
52+
public function test_set_the_file_chunk_size_file_array()
5953
{
6054
$this->increaseChunkSize();
6155

@@ -69,8 +63,7 @@ public function it_should_set_the_file_chunk_size_file_array()
6963
$this->assertSame($this->chunkSize, $this->getChunkSize($delivery));
7064
}
7165

72-
#[Test]
73-
public function it_should_set_the_file_chunk_size_file_object()
66+
public function test_set_the_file_chunk_size_file_object()
7467
{
7568
$this->increaseChunkSize();
7669
$client = new \Interfax\Client;

0 commit comments

Comments
 (0)