diff --git a/core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php b/core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php index b6fd44f..17ca9fc 100644 --- a/core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php +++ b/core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php @@ -11,7 +11,7 @@ * Runs cron on the test site. */ protected function cronRun() { - $this->container->get('cron')->run(); + $this->drupalGet('cron/' . \Drupal::state()->get('system.cron_key')); } }