function BlockFormTest::setUp

Same name in other branches
  1. 9 core/modules/block/tests/src/Unit/BlockFormTest.php \Drupal\Tests\block\Unit\BlockFormTest::setUp()
  2. 10 core/modules/block/tests/src/Unit/BlockFormTest.php \Drupal\Tests\block\Unit\BlockFormTest::setUp()
  3. 11.x core/modules/block/tests/src/Unit/BlockFormTest.php \Drupal\Tests\block\Unit\BlockFormTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/block/tests/src/Unit/BlockFormTest.php, line 70

Class

BlockFormTest
@coversDefaultClass \Drupal\block\BlockForm @group block

Namespace

Drupal\Tests\block\Unit

Code

protected function setUp() {
    parent::setUp();
    $this->conditionManager = $this->createMock('Drupal\\Core\\Executable\\ExecutableManagerInterface');
    $this->language = $this->createMock('Drupal\\Core\\Language\\LanguageManagerInterface');
    $this->contextRepository = $this->createMock('Drupal\\Core\\Plugin\\Context\\ContextRepositoryInterface');
    $this->entityTypeManager = $this->createMock('Drupal\\Core\\Entity\\EntityTypeManagerInterface');
    $this->storage = $this->createMock('Drupal\\Core\\Config\\Entity\\ConfigEntityStorageInterface');
    $this->themeHandler = $this->createMock('Drupal\\Core\\Extension\\ThemeHandlerInterface');
    $this->entityTypeManager
        ->expects($this->any())
        ->method('getStorage')
        ->will($this->returnValue($this->storage));
    $this->pluginFormFactory = $this->prophesize(PluginFormFactoryInterface::class);
}

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