class AttributeBaseTest
Same name in other branches
- 11.x core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeBaseTest.php \Drupal\Tests\Component\Plugin\Attribute\AttributeBaseTest
@coversDefaultClass \Drupal\Component\Plugin\Attribute\AttributeBase @group Attribute
Hierarchy
- class \Drupal\Tests\Component\Plugin\Attribute\AttributeBaseTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of AttributeBaseTest
File
-
core/
tests/ Drupal/ Tests/ Component/ Plugin/ Attribute/ AttributeBaseTest.php, line 14
Namespace
Drupal\Tests\Component\Plugin\AttributeView source
class AttributeBaseTest extends TestCase {
/**
* @covers ::getProvider
* @covers ::setProvider
*/
public function testSetProvider() : void {
$plugin = new AttributeBaseStub(id: '1');
$plugin->setProvider('example');
$this->assertEquals('example', $plugin->getProvider());
}
/**
* @covers ::getId
*/
public function testGetId() : void {
$plugin = new AttributeBaseStub(id: 'example');
$this->assertEquals('example', $plugin->getId());
}
/**
* @covers ::getClass
* @covers ::setClass
*/
public function testSetClass() : void {
$plugin = new AttributeBaseStub(id: '1');
$plugin->setClass('example');
$this->assertEquals('example', $plugin->getClass());
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
AttributeBaseTest::testGetId | public | function | @covers ::getId |
AttributeBaseTest::testSetClass | public | function | @covers ::getClass @covers ::setClass |
AttributeBaseTest::testSetProvider | public | function | @covers ::getProvider @covers ::setProvider |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.