function BlockFormTest::setUp
Overrides UnitTestCase::setUp
File
- 
              core/modules/ block/ tests/ src/ Unit/ BlockFormTest.php, line 96 
Class
Namespace
Drupal\Tests\block\UnitCode
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')
    ->willReturn($this->storage);
  $this->pluginFormFactory = $this->prophesize(PluginFormFactoryInterface::class);
  $this->themeManager = $this->createMock('\\Drupal\\Core\\Theme\\ThemeManagerInterface');
  $this->contextHandler = $this->createMock('Drupal\\Core\\Plugin\\Context\\ContextHandlerInterface');
  $this->blockRepository = new BlockRepository($this->entityTypeManager, $this->themeManager, $this->contextHandler);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
