function BatchBuilderTest::testSetProgressive

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

Tests setProgressive().

@covers ::setProgressive

File

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

Class

BatchBuilderTest
Tests for the batch builder class.

Namespace

Drupal\Tests\Core\Batch

Code

public function testSetProgressive() : void {
  $batch_builder = new BatchBuilder();
  $batch = $batch_builder->setProgressive(FALSE)
    ->toArray();
  $this->assertFalse($batch['progressive']);
  $batch = $batch_builder->setProgressive(TRUE)
    ->toArray();
  $this->assertTrue($batch['progressive']);
}

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