You are here

public function BatchBuilderTest::testQueueImplements in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testQueueImplements()
  2. 9 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testQueueImplements()

Tests queue class implements \Drupal\Core\Queue\QueueInterface.

@covers ::setQueue

File

core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php, line 198

Class

BatchBuilderTest
Tests for the batch builder class.

Namespace

Drupal\Tests\Core\Batch

Code

public function testQueueImplements() {
  $batch_builder = new BatchBuilder();
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('Class Exception does not implement \\Drupal\\Core\\Queue\\QueueInterface.');
  $batch_builder
    ->setQueue('BatchName', \Exception::class);
}