public function UnicodeTest::testStrpos in Drupal 8
Tests multibyte strpos.
@dataProvider providerStrpos @covers ::strpos @group legacy @expectedDeprecation \Drupal\Component\Utility\Unicode::strpos() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use mb_strpos() instead. See https://www.drupal.org/node/2850048.
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php, line 522
Class
- UnicodeTest
- Test unicode handling features implemented in Unicode component.
Namespace
Drupal\Tests\Component\UtilityCode
public function testStrpos($haystack, $needle, $offset, $expected) {
$this
->assertEquals($expected, Unicode::strpos($haystack, $needle, $offset));
}