mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
Tests: Use the data_ prefix for various data provider methods.
This aims to bring more consistency to the test suite, as the vast majority of data providers already use that prefix. Includes moving some data providers next to the tests they are used in. Follow-up to [55464]. See #57841. git-svn-id: https://develop.svn.wordpress.org/trunk@55562 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -17,14 +17,14 @@ class Tests_Compat_mbSubstr extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider utf8_substrings
|
||||
* @dataProvider data_utf8_substrings
|
||||
*/
|
||||
public function test_mb_substr( $input_string, $start, $length, $expected_character_substring ) {
|
||||
$this->assertSame( $expected_character_substring, _mb_substr( $input_string, $start, $length, 'UTF-8' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider utf8_substrings
|
||||
* @dataProvider data_utf8_substrings
|
||||
*/
|
||||
public function test_mb_substr_via_regex( $input_string, $start, $length, $expected_character_substring ) {
|
||||
_wp_can_use_pcre_u( false );
|
||||
@@ -33,7 +33,7 @@ class Tests_Compat_mbSubstr extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider utf8_substrings
|
||||
* @dataProvider data_utf8_substrings
|
||||
*/
|
||||
public function test_8bit_mb_substr( $input_string, $start, $length, $expected_character_substring, $expected_byte_substring ) {
|
||||
$this->assertSame( $expected_byte_substring, _mb_substr( $input_string, $start, $length, '8bit' ) );
|
||||
@@ -44,7 +44,7 @@ class Tests_Compat_mbSubstr extends WP_UnitTestCase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function utf8_substrings() {
|
||||
public function data_utf8_substrings() {
|
||||
return array(
|
||||
array(
|
||||
'input_string' => 'баба',
|
||||
|
||||
Reference in New Issue
Block a user