diff --git a/.gitignore b/.gitignore index 32df3db..8ae88e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /vendor /composer.lock -/.phpunit.result.cache - +/.phpunit.cache diff --git a/composer.json b/composer.json index e2f2cdd..5355475 100644 --- a/composer.json +++ b/composer.json @@ -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" }, diff --git a/phpunit.xml b/phpunit.xml index d6cb2ff..91289ba 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,13 +1,13 @@ - + tests - + src - + diff --git a/tests/VarExporterTest.php b/tests/VarExporterTest.php index 45dbe19..a4fb718 100644 --- a/tests/VarExporterTest.php +++ b/tests/VarExporterTest.php @@ -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 { @@ -302,9 +303,7 @@ public function testExportObjectWithCircularReference(): void ]); } - /** - * @dataProvider providerExportIndented - */ + #[DataProvider('providerExportIndented')] public function testExportIndented(mixed $var, string $expected, int $options): void { $template = <<<'TPL' @@ -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];