diff --git a/composer.json b/composer.json index 78900734..fb52886e 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ }, "require-dev": { "wp-cli/scaffold-command": "^1.2 || ^2", - "wp-cli/wp-cli-tests": "^4.3.9" + "wp-cli/wp-cli-tests": "^5.0.0" }, "suggest": { "ext-json": "Used for reading and generating JSON translation files", @@ -29,7 +29,8 @@ "sort-packages": true, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, - "johnpbloch/wordpress-core-installer": true + "johnpbloch/wordpress-core-installer": true, + "phpstan/extension-installer": true }, "lock": false }, @@ -62,6 +63,7 @@ "behat-rerun": "rerun-behat-tests", "lint": "run-linter-tests", "phpcs": "run-phpcs-tests", + "phpstan": "run-phpstan-tests", "phpcbf": "run-phpcbf-cleanup", "phpunit": "run-php-unit-tests", "prepare-tests": "install-package-tests", diff --git a/tests/IterableCodeExtractorTest.php b/tests/IterableCodeExtractorTest.php index 1d770e7d..30e5e752 100644 --- a/tests/IterableCodeExtractorTest.php +++ b/tests/IterableCodeExtractorTest.php @@ -2,7 +2,7 @@ namespace WP_CLI\I18n\Tests; -use WP_CLI\I18n\IterableCodeExtractor; +use PHPUnit\Framework\Attributes\DataProvider; use WP_CLI\Tests\TestCase; use WP_CLI\Utils; @@ -228,6 +228,7 @@ protected static function file_has_file_extension_invoke( $file, $extensions ) { /** * @dataProvider file_extension_extract_provider */ + #[DataProvider( 'file_extension_extract_provider' )] // phpcs:ignore PHPCompatibility.Attributes.NewAttributes.PHPUnitAttributeFound public function test_gets_file_extension_correctly( $rel_input_file, $expected_extension ) { $this->assertEquals( static::file_get_extension_multi_invoke( new \SplFileObject( self::$base . $rel_input_file ) ), $expected_extension ); } @@ -243,6 +244,7 @@ public static function file_extension_extract_provider() { /** * @dataProvider file_extensions_matches_provider */ + #[DataProvider( 'file_extensions_matches_provider' )] // phpcs:ignore PHPCompatibility.Attributes.NewAttributes.PHPUnitAttributeFound public function test_matches_file_extensions_correctly( $rel_input_file, $matching_extensions, $expected_result ) { $this->assertEquals( static::file_has_file_extension_invoke( new \SplFileObject( self::$base . $rel_input_file ), $matching_extensions ), $expected_result ); }