File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1818 },
1919 "require-dev" : {
2020 "wp-cli/scaffold-command" : " ^1.2 || ^2" ,
21- "wp-cli/wp-cli-tests" : " ^4.3.9 "
21+ "wp-cli/wp-cli-tests" : " ^5.0.0 "
2222 },
2323 "suggest" : {
2424 "ext-json" : " Used for reading and generating JSON translation files" ,
2929 "sort-packages" : true ,
3030 "allow-plugins" : {
3131 "dealerdirect/phpcodesniffer-composer-installer" : true ,
32- "johnpbloch/wordpress-core-installer" : true
32+ "johnpbloch/wordpress-core-installer" : true ,
33+ "phpstan/extension-installer" : true
3334 },
3435 "lock" : false
3536 },
6263 "behat-rerun" : " rerun-behat-tests" ,
6364 "lint" : " run-linter-tests" ,
6465 "phpcs" : " run-phpcs-tests" ,
66+ "phpstan" : " run-phpstan-tests" ,
6567 "phpcbf" : " run-phpcbf-cleanup" ,
6668 "phpunit" : " run-php-unit-tests" ,
6769 "prepare-tests" : " install-package-tests" ,
Original file line number Diff line number Diff line change 22
33namespace WP_CLI \I18n \Tests ;
44
5- use WP_CLI \ I18n \ IterableCodeExtractor ;
5+ use PHPUnit \ Framework \ Attributes \ DataProvider ;
66use WP_CLI \Tests \TestCase ;
77use WP_CLI \Utils ;
88
@@ -228,6 +228,7 @@ protected static function file_has_file_extension_invoke( $file, $extensions ) {
228228 /**
229229 * @dataProvider file_extension_extract_provider
230230 */
231+ #[DataProvider( 'file_extension_extract_provider ' )] // phpcs:ignore PHPCompatibility.Attributes.NewAttributes.PHPUnitAttributeFound
231232 public function test_gets_file_extension_correctly ( $ rel_input_file , $ expected_extension ) {
232233 $ this ->assertEquals ( static ::file_get_extension_multi_invoke ( new \SplFileObject ( self ::$ base . $ rel_input_file ) ), $ expected_extension );
233234 }
@@ -243,6 +244,7 @@ public static function file_extension_extract_provider() {
243244 /**
244245 * @dataProvider file_extensions_matches_provider
245246 */
247+ #[DataProvider( 'file_extensions_matches_provider ' )] // phpcs:ignore PHPCompatibility.Attributes.NewAttributes.PHPUnitAttributeFound
246248 public function test_matches_file_extensions_correctly ( $ rel_input_file , $ matching_extensions , $ expected_result ) {
247249 $ this ->assertEquals ( static ::file_has_file_extension_invoke ( new \SplFileObject ( self ::$ base . $ rel_input_file ), $ matching_extensions ), $ expected_result );
248250 }
You can’t perform that action at this time.
0 commit comments