public function UnicodeTest::providerStrpos in Drupal 8
Data provider for testStrpos().
Return value
array An array containing:
- The haystack string to be searched in.
- The needle string to search for.
- The offset integer to start at.
- The expected integer/FALSE result.
See also
testStrpos()
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php, line 538
Class
- UnicodeTest
- Test unicode handling features implemented in Unicode component.
Namespace
Drupal\Tests\Component\UtilityCode
public function providerStrpos() {
return [
[
'frànçAIS is über-åwesome',
'frànçAIS is über-åwesome',
0,
0,
],
[
'frànçAIS is über-åwesome',
'rànçAIS is über-åwesome',
0,
1,
],
[
'frànçAIS is über-åwesome',
'not in string',
0,
FALSE,
],
[
'frànçAIS is über-åwesome',
'r',
0,
1,
],
[
'frànçAIS is über-åwesome',
'nçAIS',
0,
3,
],
[
'frànçAIS is über-åwesome',
'nçAIS',
2,
3,
],
[
'frànçAIS is über-åwesome',
'nçAIS',
3,
3,
],
[
'以呂波耳・ほへとち。リヌルヲ。',
'波耳',
0,
2,
],
[
'以呂波耳・ほへとち。リヌルヲ。',
'波耳',
1,
2,
],
[
'以呂波耳・ほへとち。リヌルヲ。',
'波耳',
2,
2,
],
];
}