function AttributeBaseTest::testGetId

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeBaseTest.php \Drupal\Tests\Component\Plugin\Attribute\AttributeBaseTest::testGetId()

@covers ::getId

File

core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeBaseTest.php, line 29

Class

AttributeBaseTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21Plugin%21Attribute%21AttributeBase.php/class/AttributeBase/11.x" title="Provides a base class for classed attributes." class="local">\Drupal\Component\Plugin\Attribute\AttributeBase</a> @group Attribute

Namespace

Drupal\Tests\Component\Plugin\Attribute

Code

public function testGetId() : void {
    $plugin = new AttributeBaseStub(id: 'example');
    $this->assertEquals('example', $plugin->getId());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.