Skip to content

Commit d798ea5

Browse files
committed
test: Fix PHPUnit v10+ deprecation warnings
* @after annotation is replaced by the After attribute * Migrate phpunit.xml configuration to the current schema
1 parent 6ba441f commit d798ea5

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ vendor
44
.php-cs-fixer.cache
55
composer.lock
66
coverage
7+
.phpunit.cache
78
.phpunit.result.cache
89
phpunit.xml
910
.idea

phpunit.xml.dist

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
backupGlobals="false"
5+
backupStaticProperties="false"
46
beStrictAboutTestsThatDoNotTestAnything="false"
5-
bootstrap="vendor/autoload.php"
7+
cacheDirectory=".phpunit.cache"
68
colors="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
failOnRisky="true"
11-
failOnWarning="true"
129
processIsolation="false"
1310
stopOnError="false"
1411
stopOnFailure="false"
15-
verbose="true"
1612
>
1713
<testsuites>
1814
<testsuite name="Laravel Dusk for Firefox Test Suite">
1915
<directory suffix="Test.php">./tests</directory>
2016
</testsuite>
2117
</testsuites>
22-
<filter>
23-
<whitelist processUncoveredFilesFromWhitelist="true">
24-
<directory suffix=".php">./src</directory>
25-
</whitelist>
26-
</filter>
18+
<source>
19+
<include>
20+
<directory>src</directory>
21+
</include>
22+
</source>
2723
</phpunit>

src/Firefox/SupportsFirefox.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Derekmd\Dusk\Firefox;
44

55
use Laravel\Dusk\Browser;
6+
use PHPUnit\Framework\Attributes\After;
67

78
trait SupportsFirefox
89
{
@@ -27,9 +28,7 @@ trait SupportsFirefox
2728
*/
2829
protected static $firefoxLog;
2930

30-
/**
31-
* @after
32-
*/
31+
#[After]
3332
public function tearDownFirefoxConsoleOutput()
3433
{
3534
if (static::$firefoxLog) {

0 commit comments

Comments
 (0)