function BatchBuilderTest::testSetQueue
Same name in other branches
- 8.9.x 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()
- 11.x 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->assertEquals([
'name' => 'BatchName',
'class' => '\\Drupal\\Core\\Queue\\Batch',
], $batch['queue'], 'Batch queue has been set.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.