public function DomStrReplaceTest::providerTestTransform in Migrate Plus 8.5
Same name and namespace in other branches
- 8.4 tests/src/Unit/process/DomStrReplaceTest.php \Drupal\Tests\migrate_plus\Unit\process\DomStrReplaceTest::providerTestTransform()
Dataprovider for testTransform().
File
- tests/
src/ Unit/ process/ DomStrReplaceTest.php, line 118
Class
- DomStrReplaceTest
- Tests the dom_str_replace process plugin.
Namespace
Drupal\Tests\migrate_plus\Unit\processCode
public function providerTestTransform() : array {
$cases = [
'string:case_sensitive' => [
'<a href="/foo/Foo/foo">text</a>',
$this->exampleConfiguration,
'<a href="/bar/Foo/bar">text</a>',
],
'string:case_insensitive' => [
'<a href="/foo/Foo/foo">text</a>',
[
'case_insensitive' => TRUE,
] + $this->exampleConfiguration,
'<a href="/bar/bar/bar">text</a>',
],
'regex' => [
'<a href="/foo/Foo/foo">text</a>',
[
'search' => '/(.)\\1/',
'regex' => TRUE,
] + $this->exampleConfiguration,
'<a href="/fbar/Fbar/fbar">text</a>',
],
];
return $cases;
}