function AttributeHelperTest::testAttributeExists
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php \Drupal\Tests\Core\Template\AttributeHelperTest::testAttributeExists()
- 10 core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php \Drupal\Tests\Core\Template\AttributeHelperTest::testAttributeExists()
- 11.x core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php \Drupal\Tests\Core\Template\AttributeHelperTest::testAttributeExists()
@covers ::attributeExists @dataProvider providerTestAttributeExists
File
-
core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeHelperTest.php, line 36
Class
- AttributeHelperTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Template%21AttributeHelper.php/class/AttributeHelper/8.9.x" title="Helper class to deal with mixed array and Attribute operations." class="local">\Drupal\Core\Template\AttributeHelper</a> @group Template
Namespace
Drupal\Tests\Core\TemplateCode
public function testAttributeExists(array $test_data, $test_attribute, $expected) {
$this->assertSame($expected, AttributeHelper::attributeExists($test_attribute, $test_data));
$attributes = new Attribute($test_data);
$this->assertSame($expected, AttributeHelper::attributeExists($test_attribute, $attributes));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.