function AttributesTest::testDrupalAttributes
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Common/AttributesTest.php \Drupal\Tests\Core\Common\AttributesTest::testDrupalAttributes()
- 10 core/tests/Drupal/Tests/Core/Common/AttributesTest.php \Drupal\Tests\Core\Common\AttributesTest::testDrupalAttributes()
- 11.x core/tests/Drupal/Tests/Core/Common/AttributesTest.php \Drupal\Tests\Core\Common\AttributesTest::testDrupalAttributes()
Tests casting an Attribute object to a string.
@dataProvider providerTestAttributeData
See also
\Drupal\Core\Template\Attribute::__toString()
File
-
core/
tests/ Drupal/ Tests/ Core/ Common/ AttributesTest.php, line 55
Class
- AttributesTest
- Tests the Drupal\Core\Template\Attribute functionality.
Namespace
Drupal\Tests\Core\CommonCode
public function testDrupalAttributes($attributes, $expected, $message) {
$this->assertSame($expected, (string) new Attribute($attributes), $message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.