You are here

public function JobTest::testIncompleteDefinition in Advanced Queue 8

@covers ::__construct

File

tests/src/Unit/JobTest.php, line 30

Class

JobTest
@coversDefaultClass \Drupal\advancedqueue\Job @group advancedqueue

Namespace

Drupal\Tests\advancedqueue\Unit

Code

public function testIncompleteDefinition() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('Missing property "type"');
  new Job([
    'payload' => [
      '123456',
    ],
    'state' => Job::STATE_QUEUED,
  ]);
}