Skip to content

Commit faa03bb

Browse files
Laravel 10.x Compatibility (#20)
Co-authored-by: Pascal Baljet <pascal@pascalbaljet.nl>
1 parent 8180c11 commit faa03bb

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

.github/workflows/run-tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ jobs:
88
strategy:
99
fail-fast: true
1010
matrix:
11-
php: [8.2, 8.1, 8.0]
12-
laravel: [9.*]
11+
php: [8.2, 8.1]
12+
laravel: [10.*, 9.*]
1313
dependency-version: [prefer-lowest, prefer-stable]
1414
include:
15+
- laravel: 10.*
16+
testbench: 8.*
1517
- laravel: 9.*
1618
testbench: 7.*
17-
exclude:
18-
- laravel: 9.*
19-
php: 7.4
2019

2120
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
2221

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.0 || ^8.1 || ^8.2",
20-
"illuminate/support": "^9.0"
19+
"php": "^8.1|^8.2",
20+
"illuminate/support": "^9.0|^10.0"
2121
},
2222
"require-dev": {
23-
"nesbot/carbon": "^2.63",
24-
"orchestra/testbench": "^7.0",
25-
"phpunit/phpunit": "^9.4"
23+
"nesbot/carbon": "^2.66",
24+
"orchestra/testbench": "^7.0|^8.0",
25+
"phpunit/phpunit": "^9.5.10"
2626
},
2727
"autoload": {
2828
"psr-4": {
@@ -50,4 +50,4 @@
5050
]
5151
}
5252
}
53-
}
53+
}

tests/MustVerifyNewEmailTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Mail\Mailable;
66
use Illuminate\Support\Facades\Mail;
7+
use Illuminate\Support\Testing\Fakes\MailFake;
78
use ProtoneMedia\LaravelVerifyNewEmail\InvalidEmailVerificationModelException;
89
use ProtoneMedia\LaravelVerifyNewEmail\Mail\VerifyFirstEmail;
910
use ProtoneMedia\LaravelVerifyNewEmail\Mail\VerifyNewEmail;
@@ -102,14 +103,15 @@ public function it_can_generate_a_token_and_mail_it_to_the_new_email_address()
102103
/** @test */
103104
public function it_can_regenerate_a_token_and_mail_it()
104105
{
105-
Mail::fake();
106+
$mailRoot = Mail::getFacadeRoot();
107+
Mail::swap(new MailFake($mailRoot));
106108

107109
$user = $this->user();
108110

109111
$pendingUserEmailFirst = $user->newEmail('new@example.com');
110112

111113
// reset mail fake
112-
Mail::fake();
114+
Mail::swap(new MailFake($mailRoot));
113115
Mail::assertNothingQueued();
114116

115117
$pendingUserEmailSecond = $user->resendPendingEmailVerificationMail();

0 commit comments

Comments
 (0)