protected function SelectListTest::setUp in Plugin 8.2
Overrides PluginSelectorBaseTestBase::setUp
File
- tests/
src/ Unit/ Plugin/ Plugin/ PluginSelector/ SelectListTest.php, line 44
Class
- SelectListTest
- @coversDefaultClass \Drupal\plugin\Plugin\Plugin\PluginSelector\SelectList
Namespace
Drupal\Tests\plugin\Unit\Plugin\Plugin\PluginSelectorCode
protected function setUp() : void {
parent::setUp();
$this->responsePolicy = $this
->getMockBuilder(KillSwitch::class)
->disableOriginalConstructor()
->getMock();
$this->stringTranslation = $this
->getStringTranslationStub();
$this->selectablePluginType
->expects($this
->any())
->method('ensureTypedPluginDefinition')
->willReturnArgument(0);
$this->sut = new SelectList([], $this->pluginId, $this->pluginDefinition, $this->defaultPluginResolver, $this->stringTranslation, $this->responsePolicy);
$this->sut
->setSelectablePluginType($this->selectablePluginType);
}