You are here

protected function WebTestBase::setBatch in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/WebTestBase.php \Drupal\simpletest\WebTestBase::setBatch()

Preserve the original batch, and instantiate the test batch.

2 calls to WebTestBase::setBatch()
UpdatePathTestBase::setUp in core/modules/system/src/Tests/Update/UpdatePathTestBase.php
Overrides WebTestBase::setUp() for update testing.
WebTestBase::setUp in core/modules/simpletest/src/WebTestBase.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/simpletest/src/WebTestBase.php, line 952
Contains \Drupal\simpletest\WebTestBase.

Class

WebTestBase
Test case for typical Drupal tests.

Namespace

Drupal\simpletest

Code

protected function setBatch() {

  // When running tests through the Simpletest UI (vs. on the command line),
  // Simpletest's batch conflicts with the installer's batch. Batch API does
  // not support the concept of nested batches (in which the nested is not
  // progressive), so we need to temporarily pretend there was no batch.
  // Backup the currently running Simpletest batch.
  $this->originalBatch = batch_get();

  // Reset the static batch to remove Simpletest's batch operations.
  $batch =& batch_get();
  $batch = [];
}