CronRunTrait.php in Drupal 9
Same filename and directory in other branches
Namespace
Drupal\Tests\Traits\CoreFile
core/tests/Drupal/Tests/Traits/Core/CronRunTrait.phpView source
<?php
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
Name | Description |
---|---|
CronRunTrait | Adds ability to run cron from tests. |