class AnnotationBaseTest in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php \Drupal\Tests\Component\Annotation\AnnotationBaseTest
- 9 core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php \Drupal\Tests\Component\Annotation\AnnotationBaseTest
@coversDefaultClass \Drupal\Component\Annotation\AnnotationBase @group Annotation
Hierarchy
- class \Drupal\Tests\Component\Annotation\AnnotationBaseTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of AnnotationBaseTest
File
- core/
tests/ Drupal/ Tests/ Component/ Annotation/ AnnotationBaseTest.php, line 12
Namespace
Drupal\Tests\Component\AnnotationView source
class AnnotationBaseTest extends TestCase {
/**
* @covers ::getProvider
* @covers ::setProvider
*/
public function testSetProvider() {
$plugin = new AnnotationBaseStub();
$plugin
->setProvider('example');
$this
->assertEquals('example', $plugin
->getProvider());
}
/**
* @covers ::getId
*/
public function testGetId() {
$plugin = new AnnotationBaseStub();
// Doctrine sets the public prop directly.
$plugin->id = 'example';
$this
->assertEquals('example', $plugin
->getId());
}
/**
* @covers ::getClass
* @covers ::setClass
*/
public function testSetClass() {
$plugin = new AnnotationBaseStub();
$plugin
->setClass('example');
$this
->assertEquals('example', $plugin
->getClass());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AnnotationBaseTest:: |
public | function | @covers ::getId | |
AnnotationBaseTest:: |
public | function | @covers ::getClass @covers ::setClass | |
AnnotationBaseTest:: |
public | function | @covers ::getProvider @covers ::setProvider |