You are here

protected function BaseTest::createJobWithItems in TMGMT Extension Suite 8.2

Creates a job.

1 call to BaseTest::createJobWithItems()
BaseTest::setUp in tests/src/Kernel/BaseTest.php

File

tests/src/Kernel/BaseTest.php, line 68

Class

BaseTest
TMGMT Extension Suit kernel test base class.

Namespace

Drupal\Tests\tmgmt_extension_suit\Kernel

Code

protected function createJobWithItems() {
  $job = parent::createJob();
  $job->state = JobInterface::STATE_ACTIVE;
  $job
    ->save();
  for ($i = 1; $i < 3; $i++) {
    $job
      ->addItem('test_source', 'test', $i);
  }
}