function BatchBuilderTest::testSetFinishCallback

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

Tests setFinishCallback().

@covers ::setFinishCallback

File

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

Class

BatchBuilderTest
Tests for the batch builder class.

Namespace

Drupal\Tests\Core\Batch

Code

public function testSetFinishCallback() : void {
    $batch = (new BatchBuilder())->setFinishCallback('\\Drupal\\Tests\\Core\\Batch\\BatchBuilderTest::finishedCallback')
        ->toArray();
    $this->assertEquals('\\Drupal\\Tests\\Core\\Batch\\BatchBuilderTest::finishedCallback', $batch['finished']);
}

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