Skip to content

Commit 8a05b69

Browse files
committed
Add support for Laravel 12
1 parent 41558a6 commit 8a05b69

File tree

4 files changed

+28
-16
lines changed

4 files changed

+28
-16
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
],
1818
"require": {
1919
"php": "^8.1",
20-
"illuminate/support": "^10.0|^11.0"
20+
"illuminate/support": "^10.0|^11.0|^12.0"
2121
},
2222
"require-dev": {
23-
"orchestra/testbench": "^8.0",
24-
"phpunit/phpunit": "^9.0"
23+
"orchestra/testbench": "^10.0",
24+
"phpunit/phpunit": "^11.0"
2525
},
2626
"autoload": {
2727
"psr-4": {

phpunit.xml.dist

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
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">
3-
<coverage>
4-
<include>
5-
<directory suffix=".php">src/</directory>
6-
</include>
7-
</coverage>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
bootstrap="vendor/autoload.php"
5+
backupGlobals="false"
6+
colors="true"
7+
processIsolation="false"
8+
stopOnFailure="false"
9+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
10+
displayDetailsOnTestsThatTriggerDeprecations="true"
11+
displayDetailsOnTestsThatTriggerErrors="true"
12+
displayDetailsOnTestsThatTriggerNotices="true"
13+
displayDetailsOnTestsThatTriggerWarnings="true"
14+
displayDetailsOnPhpunitDeprecations="true"
15+
>
16+
817
<testsuites>
918
<testsuite name="Test Suite">
1019
<directory>tests</directory>
@@ -14,4 +23,9 @@
1423
<env name="DB_CONNECTION" value="testing"/>
1524
<env name="MAIL_MAILER" value="log"/>
1625
</php>
26+
<source>
27+
<include>
28+
<directory suffix=".php">src</directory>
29+
</include>
30+
</source>
1731
</phpunit>

tests/ExampleTest.php

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

33
namespace Krisell\LaravelEmailLogger\Tests;
44

5-
use Carbon\Carbon;
6-
use Illuminate\Foundation\Auth\User;
7-
use Illuminate\Foundation\Testing\RefreshDatabase;
5+
use Orchestra\Testbench\TestCase;
86
use Illuminate\Support\Facades\Mail;
7+
use PHPUnit\Framework\Attributes\Test;
98
use Krisell\LaravelEmailLogger\EmailLog;
10-
use Krisell\LaravelEmailLogger\LaravelEmailLoggerServiceProvider;
9+
use Illuminate\Foundation\Testing\RefreshDatabase;
1110
use Krisell\LaravelEmailLogger\Tests\TestMailable;
12-
use Orchestra\Testbench\TestCase;
11+
use Krisell\LaravelEmailLogger\LaravelEmailLoggerServiceProvider;
1312

1413
class ExampleTest extends TestCase
1514
{
@@ -20,7 +19,7 @@ protected function getPackageProviders($app)
2019
return [LaravelEmailLoggerServiceProvider::class];
2120
}
2221

23-
/** @test */
22+
#[Test]
2423
public function a_test()
2524
{
2625
$this->assertCount(0, EmailLog::all());

tests/TestMailable.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Illuminate\Bus\Queueable;
66
use Illuminate\Mail\Mailable;
77
use Illuminate\Queue\SerializesModels;
8-
use Illuminate\Contracts\Queue\ShouldQueue;
98

109
class TestMailable extends Mailable
1110
{

0 commit comments

Comments
 (0)