function BatchBuilderTest::testSetUrlOptions

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetUrlOptions()
  2. 8.9.x core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetUrlOptions()
  3. 11.x core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetUrlOptions()

Tests setUrlOptions().

@covers ::setUrlOptions

File

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

Class

BatchBuilderTest
Tests for the batch builder class.

Namespace

Drupal\Tests\Core\Batch

Code

public function testSetUrlOptions() : void {
  $options = [
    'absolute' => TRUE,
    'language' => 'de',
  ];
  $batch = (new BatchBuilder())->setUrlOptions($options)
    ->toArray();
  $this->assertEquals($options, $batch['url_options']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.