You are here

protected function BlockFormTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 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() : void {
  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);
}