Skip to content

Commit

Permalink
Laravel 10.x Compatibility (#20)
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Baljet <pascal@pascalbaljet.nl>
  • Loading branch information
laravel-shift and pascalbaljet authored Feb 21, 2023
1 parent 8180c11 commit faa03bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.2, 8.1, 8.0]
laravel: [9.*]
php: [8.2, 8.1]
laravel: [10.*, 9.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
exclude:
- laravel: 9.*
php: 7.4

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

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
}
],
"require": {
"php": "^8.0 || ^8.1 || ^8.2",
"illuminate/support": "^9.0"
"php": "^8.1|^8.2",
"illuminate/support": "^9.0|^10.0"
},
"require-dev": {
"nesbot/carbon": "^2.63",
"orchestra/testbench": "^7.0",
"phpunit/phpunit": "^9.4"
"nesbot/carbon": "^2.66",
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9.5.10"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -50,4 +50,4 @@
]
}
}
}
}
6 changes: 4 additions & 2 deletions tests/MustVerifyNewEmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Mail\Mailable;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Testing\Fakes\MailFake;
use ProtoneMedia\LaravelVerifyNewEmail\InvalidEmailVerificationModelException;
use ProtoneMedia\LaravelVerifyNewEmail\Mail\VerifyFirstEmail;
use ProtoneMedia\LaravelVerifyNewEmail\Mail\VerifyNewEmail;
Expand Down Expand Up @@ -102,14 +103,15 @@ public function it_can_generate_a_token_and_mail_it_to_the_new_email_address()
/** @test */
public function it_can_regenerate_a_token_and_mail_it()
{
Mail::fake();
$mailRoot = Mail::getFacadeRoot();
Mail::swap(new MailFake($mailRoot));

$user = $this->user();

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

// reset mail fake
Mail::fake();
Mail::swap(new MailFake($mailRoot));
Mail::assertNothingQueued();

$pendingUserEmailSecond = $user->resendPendingEmailVerificationMail();
Expand Down

0 comments on commit faa03bb

Please sign in to comment.