AnnotationBaseStub example

/** * @coversDefaultClass \Drupal\Component\Annotation\AnnotationBase * @group Annotation */
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';
    
Home | Imprint | This part of the site doesn't use cookies.