CronRunTrait.php
Same filename in other branches
Namespace
Drupal\Tests\Traits\CoreFile
-
core/
tests/ Drupal/ Tests/ Traits/ Core/ CronRunTrait.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\Traits\Core;
/**
* Adds ability to run cron from tests.
*/
trait CronRunTrait {
/**
* Runs cron on the test site.
*/
protected function cronRun() {
$this->drupalGet('cron/' . \Drupal::state()->get('system.cron_key'));
}
}
Traits
Title | Deprecated | Summary |
---|---|---|
CronRunTrait | Adds ability to run cron from tests. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.