public function BatchBuilderTest::testSetQueue in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetQueue()
- 10 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetQueue()
Tests setQueue().
@covers ::setQueue
File
- core/
tests/ Drupal/ Tests/ Core/ Batch/ BatchBuilderTest.php, line 170
Class
- BatchBuilderTest
- Tests for the batch builder class.
Namespace
Drupal\Tests\Core\BatchCode
public function testSetQueue() {
$batch = (new BatchBuilder())
->setQueue('BatchName', '\\Drupal\\Core\\Queue\\Batch')
->toArray();
$this
->assertArrayEquals([
'name' => 'BatchName',
'class' => '\\Drupal\\Core\\Queue\\Batch',
], $batch['queue'], 'Batch queue has been set.');
}