Skip to content

Commit

Permalink
test: Fix PHPUnit v10+ deprecation warnings
Browse files Browse the repository at this point in the history
* @after annotation is replaced by the After attribute
* Migrate phpunit.xml configuration to the current schema
  • Loading branch information
derekmd committed Oct 20, 2024
1 parent 6ba441f commit d798ea5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vendor
.php-cs-fixer.cache
composer.lock
coverage
.phpunit.cache
.phpunit.result.cache
phpunit.xml
.idea
24 changes: 10 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticProperties="false"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
>
<testsuites>
<testsuite name="Laravel Dusk for Firefox Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<source>
<include>
<directory>src</directory>
</include>
</source>
</phpunit>
5 changes: 2 additions & 3 deletions src/Firefox/SupportsFirefox.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Derekmd\Dusk\Firefox;

use Laravel\Dusk\Browser;
use PHPUnit\Framework\Attributes\After;

trait SupportsFirefox
{
Expand All @@ -27,9 +28,7 @@ trait SupportsFirefox
*/
protected static $firefoxLog;

/**
* @after
*/
#[After]
public function tearDownFirefoxConsoleOutput()
{
if (static::$firefoxLog) {
Expand Down

0 comments on commit d798ea5

Please sign in to comment.