public function BatchBuilderTest::testAddingLibraries in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testAddingLibraries()
- 10 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testAddingLibraries()
Tests setting and adding libraries.
@covers ::setLibraries
File
- core/
tests/ Drupal/ Tests/ Core/ Batch/ BatchBuilderTest.php, line 137
Class
- BatchBuilderTest
- Tests for the batch builder class.
Namespace
Drupal\Tests\Core\BatchCode
public function testAddingLibraries() {
$batch = (new BatchBuilder())
->setLibraries([
'only/library',
])
->toArray();
$this
->assertEquals([
'only/library',
], $batch['library']);
}