Skip to content

Commit

Permalink
Update PHPUnit to 10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Feb 20, 2025
1 parent f8e44d3 commit 808a570
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/vendor
/composer.lock
/.phpunit.result.cache

/.phpunit.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"nikic/php-parser": "^5.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"phpunit/phpunit": "^10.5",
"php-coveralls/php-coveralls": "^2.2",
"vimeo/psalm": "6.8.4"
},
Expand Down
6 changes: 3 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="VarExporter tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</source>
</phpunit>
7 changes: 3 additions & 4 deletions tests/VarExporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Brick\VarExporter\Tests\Classes\PublicPropertiesOnly;
use Brick\VarExporter\Tests\Classes\SetState;
use Brick\VarExporter\VarExporter;
use PHPUnit\Framework\Attributes\DataProvider;

class VarExporterTest extends AbstractTestCase
{
Expand Down Expand Up @@ -302,9 +303,7 @@ public function testExportObjectWithCircularReference(): void
]);
}

/**
* @dataProvider providerExportIndented
*/
#[DataProvider('providerExportIndented')]
public function testExportIndented(mixed $var, string $expected, int $options): void
{
$template = <<<'TPL'
Expand All @@ -320,7 +319,7 @@ public function foo()
$this->assertEquals($expected, $result);
}

public function providerExportIndented(): iterable
public static function providerExportIndented(): iterable
{
// Array
$var = ['one' => ['hello', true], 'two' => 2];
Expand Down

0 comments on commit 808a570

Please sign in to comment.