protected function PdbBlockDeriverTest::setUp in Decoupled Blocks 8
Create the setup for constants.
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Plugin/ Derivative/ PdbBlockDeriverTest.php, line 33
Class
- PdbBlockDeriverTest
- @coversDefaultClass \Drupal\pdb\Plugin\Derivative\PdbBlockDeriver @group pdb
Namespace
Drupal\Tests\pdb\Unit\Plugin\DerivativeCode
protected function setUp() {
parent::setUp();
// Mock the UUID service.
$this->componentDiscovery = $this
->prophesize(ComponentDiscoveryInterface::CLASS);
$this->componentDiscovery
->getComponents()
->willReturn([
'block_1' => (object) [
'type' => 'pdb',
'info' => [
'name' => 'Block 1',
'machine_name' => 'block_1',
'presentation' => 'pdb',
'contexts' => [
'entity' => 'node',
],
],
],
]);
$this->deriver = new PdbBlockDeriver($this->componentDiscovery
->reveal());
}