You are here

public function JobTest::testInvalidState in Advanced Queue 8

@covers ::__construct

File

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

Class

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

Namespace

Drupal\Tests\advancedqueue\Unit

Code

public function testInvalidState() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('Invalid state "INVALID" given');
  new Job([
    'type' => 'test',
    'payload' => [
      '123456',
    ],
    'state' => 'INVALID',
  ]);
}