function BlockFormTest::setUp
Same name in other branches
- 9 core/modules/block/tests/src/Unit/BlockFormTest.php \Drupal\Tests\block\Unit\BlockFormTest::setUp()
- 8.9.x core/modules/block/tests/src/Unit/BlockFormTest.php \Drupal\Tests\block\Unit\BlockFormTest::setUp()
- 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 93
Class
- BlockFormTest
- @coversDefaultClass \Drupal\block\BlockForm @group block
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.