protected function TaskRunnerTest::setUp in Webform Scheduled Tasks 8.2
Same name in this branch
- 8.2 tests/src/Unit/TaskRunnerTest.php \Drupal\Tests\webform_scheduled_tasks\Unit\TaskRunnerTest::setUp()
- 8.2 tests/src/Kernel/TaskRunnerTest.php \Drupal\Tests\webform_scheduled_tasks\Kernel\TaskRunnerTest::setUp()
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ TaskRunnerTest.php, line 47
Class
- TaskRunnerTest
- @coversDefaultClass \Drupal\webform_scheduled_tasks\TaskRunner @group webform_scheduled_tasks
Namespace
Drupal\Tests\webform_scheduled_tasks\KernelCode
protected function setUp() {
parent::setUp();
$this
->installSchema('webform', [
'webform',
]);
$this
->installEntitySchema('webform_submission');
$this
->installEntitySchema('user');
$time = $this
->prophesize(TimeInterface::class);
$time
->getRequestTime()
->willReturn(1000);
$this->container
->set('datetime.time', $time
->reveal());
$this->testWebform = Webform::create([
'id' => 'scheduled_webform',
]);
$this->testWebform
->save();
$this->taskRunner = $this->container
->get('webform_scheduled_tasks.task_runner');
}