function CronRunTrait::cronRun
Same name in other branches
- 9 core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php \Drupal\Tests\Traits\Core\CronRunTrait::cronRun()
- 8.9.x core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php \Drupal\Tests\Traits\Core\CronRunTrait::cronRun()
- 11.x core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php \Drupal\Tests\Traits\Core\CronRunTrait::cronRun()
Runs cron on the test site.
18 calls to CronRunTrait::cronRun()
- BrowserTestBaseTest::testCronRun in core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php - Tests the ::cronRun() method.
- CronRunTest::testCronExceptions in core/
modules/ system/ tests/ src/ Functional/ System/ CronRunTest.php - Make sure exceptions thrown on hook_cron() don't affect other modules.
- HelpTopicSearchTest::setUp in core/
modules/ help/ tests/ src/ Functional/ HelpTopicSearchTest.php - HelpTopicSearchTest::testHelpSearch in core/
modules/ help/ tests/ src/ Functional/ HelpTopicSearchTest.php - Tests help topic search.
- LocaleUpdateCronTest::testUpdateCron in core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateCronTest.php - Tests interface translation update using cron.
File
-
core/
tests/ Drupal/ Tests/ Traits/ Core/ CronRunTrait.php, line 15
Class
- CronRunTrait
- Adds ability to run cron from tests.
Namespace
Drupal\Tests\Traits\CoreCode
protected function cronRun() {
$this->drupalGet('cron/' . \Drupal::state()->get('system.cron_key'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.