function CronTest::resetTestingState

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/CronTest.php \Drupal\Tests\Core\CronTest::resetTestingState()
  2. 10 core/tests/Drupal/Tests/Core/CronTest.php \Drupal\Tests\Core\CronTest::resetTestingState()

Resets the testing state.

File

core/tests/Drupal/Tests/Core/CronTest.php, line 156

Class

CronTest
Tests the Cron class.

Namespace

Drupal\Tests\Core

Code

protected function resetTestingState() {
  $this->queue
    ->deleteQueue();
  $this->state
    ->set('cron_test.message_logged', FALSE);
  $this->state
    ->set('cron_test.requeue_count', NULL);
}

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