You are here

protected function DeploymentStorageHandlerTest::setUp in Build Hooks 8.2

Same name and namespace in other branches
  1. 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\Kernel

Code

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!'));
}