Skip to content

Commit cec750f

Browse files
committed
Fix phpunit tests
1 parent 48cc0a4 commit cec750f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/IterableCodeExtractorTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace WP_CLI\I18n\Tests;
44

5-
use WP_CLI\I18n\IterableCodeExtractor;
5+
use PHPUnit\Framework\Attributes\DataProvider;
66
use WP_CLI\Tests\TestCase;
77
use 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
}

0 commit comments

Comments
 (0)