protected function WebTestBase::setBatch in SimpleTest 8.3
Preserve the original batch, and instantiate the test batch.
1 call to WebTestBase::setBatch()
- WebTestBase::setUp in src/
WebTestBase.php - Sets up a Drupal site for running functional and integration tests.
File
- src/
WebTestBase.php, line 410
Class
- WebTestBase
- Test case for typical Drupal tests.
Namespace
Drupal\simpletestCode
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 = [];
}