diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php index daab34b..15c16ba 100644 --- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php +++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php @@ -5,6 +5,7 @@ use Drupal\Component\Utility\Html; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; +use Drupal\Tests\Traits\Core\CronRunTrait; /** * Tests BrowserTestBase functionality. @@ -13,6 +14,8 @@ */ class BrowserTestBaseTest extends BrowserTestBase { + use CronRunTrait; + /** * Modules to enable. * @@ -150,6 +153,7 @@ public function testLegacyAsserts() { public function testCronRun() { $last_cron_time = $this->container->get('state')->get('system.cron_last'); $this->cronRun(); + $this->assertSession()->statusCodeEquals(204); $next_cron_time = $this->container->get('state')->get('system.cron_last'); $this->assertGreaterThan($last_cron_time, $next_cron_time); diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index 3456db1..6e53e28 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -53,7 +53,6 @@ placeBlock as drupalPlaceBlock; } use AssertLegacyTrait; - use CronRunTrait; use RandomGeneratorTrait; use SessionTestTrait; use NodeCreationTrait { diff --git a/core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php b/core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php index 10fb213..eaeeec6 100644 --- a/core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php +++ b/core/tests/Drupal/Tests/Traits/Core/CronRunTrait.php @@ -12,7 +12,6 @@ */ protected function cronRun() { $this->drupalGet('cron/' . $this->container->get('state')->get('system.cron_key')); - $this->assertResponse(204); } }