function DevelGenerateManagerTest::setUp

Same name in other branches
  1. 5.x devel_generate/tests/src/Unit/DevelGenerateManagerTest.php \Drupal\Tests\devel_generate\Unit\DevelGenerateManagerTest::setUp()

Overrides UnitTestCase::setUp

File

devel_generate/tests/src/Unit/DevelGenerateManagerTest.php, line 39

Class

DevelGenerateManagerTest
@coversDefaultClass \Drupal\devel_generate\DevelGeneratePluginManager @group devel_generate

Namespace

Drupal\Tests\devel_generate\Unit

Code

protected function setUp() {
    parent::setUp();
    // Mock a Discovery object to replace AnnotationClassDiscovery.
    $this->discovery = $this->createMock('Drupal\\Component\\Plugin\\Discovery\\DiscoveryInterface');
    $this->discovery
        ->expects($this->any())
        ->method('getDefinitions')
        ->will($this->returnValue($this->definitions));
}