function AttributeTest::providerTestMerge
Provides tests data for testMerge.
Return value
array An array of test data each containing an initial Attribute object, an Attribute object or array to be merged, and the expected result.
File
-
core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php, line 523
Class
Namespace
Drupal\Tests\Core\TemplateCode
public static function providerTestMerge() {
return [
[
new Attribute([]),
new Attribute([
'class' => [
'class1',
],
]),
new Attribute([
'class' => [
'class1',
],
]),
],
[
new Attribute([
'class' => [
'example-class',
],
]),
new Attribute([
'class' => [
'class1',
],
]),
new Attribute([
'class' => [
'example-class',
'class1',
],
]),
],
[
new Attribute([
'class' => [
'example-class',
],
]),
new Attribute([
'id' => 'foo',
'href' => 'bar',
]),
new Attribute([
'class' => [
'example-class',
],
'id' => 'foo',
'href' => 'bar',
]),
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.