function CronTest::resetTestingState

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

Resets the testing state.

2 calls to CronTest::resetTestingState()
CronTest::testProcessQueues in core/tests/Drupal/Tests/Core/CronTest.php
Tests the ::processQueues() method.
CronTest::testRequeueException in core/tests/Drupal/Tests/Core/CronTest.php
Verify that RequeueException causes an item to be processed multiple times.

File

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

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.