public function BatchBuilderTest::testSetQueue in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetQueue()
- 9 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.');
}