public function DomApplyStylesTest::providerTestConfig in Migrate Plus 8.5
Dataprovider for testValidateRules().
File
- tests/
src/ Unit/ process/ DomApplyStylesTest.php, line 85
Class
- DomApplyStylesTest
- Tests the dom_apply_styles process plugin.
Namespace
Drupal\Tests\migrate_plus\Unit\processCode
public function providerTestConfig() : array {
$cases = [
'format-empty' => [
[
'format' => '',
],
'The "format" option must be a non-empty string.',
],
'format-not-string' => [
[
'format' => [
1,
2,
3,
],
],
'The "format" option must be a non-empty string.',
],
'rules-not-array' => [
[
'rules' => 'invalid',
],
'The "rules" option must be an array.',
],
'xpath-null' => [
[
'rules' => [
[
'xpath' => NULL,
'style' => 'Bold',
],
],
],
'The "xpath" and "style" options are required for each rule.',
],
'style-invalid' => [
[
'rules' => [
[
'xpath' => '//b',
'style' => 'invalid-style',
],
],
],
'The style "invalid-style" is not defined.',
],
];
return $cases;
}