You appear to be a bot. Output may be restricted
Description
Data provider.
Usage
$array = Tests_Compat_mbSubstr::data_mb_substr_phpcore_input_type_handling();
Parameters
Returns
array
Source
File name: wordpress-develop-tests/phpunit/tests/compat/mbSubstr.php
Lines:
1 to 83 of 83
public function data_mb_substr_phpcore_input_type_handling() { $heredoc = <<<EOT hello world EOT; return array( 'integer zero' => array( 'input' => 0, 'expected' => '0', ), 'integer 1' => array( 'input' => 1, 'expected' => '1', ), 'positive integer' => array( 'input' => 12345, 'expected' => '12345', ), 'negative integer' => array( 'input' => -2345, 'expected' => '-2345', ), // Float data. 'positive float with fraction' => array( 'input' => 10.5, 'expected' => '10.5', ), 'negative float with fraction' => array( 'input' => -10.5, 'expected' => '-10.5', ), 'float scientific whole number' => array( 'input' => 12.3456789000e10, 'expected' => '12345', ), 'float scientific with fraction' => array( 'input' => 12.3456789000E-10, 'expected' => '1.234', ), 'float, fraction only' => array( 'input' => .5, 'expected' => '0.5', ), // Null data. 'null' => array( 'input' => null, 'expected' => '', ), // Boolean data. 'boolean true' => array( 'input' => true, 'expected' => '1', ), 'boolean false' => array( 'input' => false, 'expected' => '', ), // Empty data. 'empty string' => array( 'input' => '', 'expected' => '', ), // String data. 'double quoted string' => array( 'input' => "string'", 'expected' => 'strin', ), 'single quoted string' => array( 'input' => 'string', 'expected' => 'strin', ), 'heredoc string' => array( 'input' => $heredoc, 'expected' => 'hello', ), // Object data. 'object with __toString method' => array( 'input' => new ClassWithToStringForMbSubstr(), 'expected' => 'Class', ), ); }