function AttributeTest::testHasAttribute
Tests has attribute.
@legacy-covers ::hasAttribute
Attributes
#[DataProvider('providerTestHasAttribute')]
File
-
core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php, line 510
Class
Namespace
Drupal\Tests\Core\TemplateCode
public function testHasAttribute(array $test_data, $test_attribute, $expected) : void {
$attributes = new Attribute($test_data);
$this->assertSame($expected, $attributes->hasAttribute($test_attribute));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.