protected function DeploymentStorageHandlerTest::setUp in Build Hooks 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/DeploymentStorageHandlerTest.php \Drupal\Tests\build_hooks\Kernel\DeploymentStorageHandlerTest::setUp()
Overrides BuildHooksKernelTestBase::setUp
File
- tests/
src/ Kernel/ DeploymentStorageHandlerTest.php, line 31
Class
- DeploymentStorageHandlerTest
- Defines a class for testing deployment storage handler.
Namespace
Drupal\Tests\build_hooks\KernelCode
protected function setUp() {
parent::setUp();
$this
->createTestEnvironment();
$time = $this
->prophesize(TimeInterface::class);
$time
->getCurrentTime()
->willReturn(self::MOCK_TIME);
$this->container
->set('datetime.time', $time
->reveal());
$this->storage = \Drupal::entityTypeManager()
->getStorage('build_hooks_deployment');
$this
->mockClient(new Response(200, [], 'It worked!'));
}