You are here

public function ServiceSmokeAndFireTest::testIsSystemOnFireReturnsCheck in Purge 8.3

Tests \Drupal\purge\Plugin\Purge\DiagnosticCheck\DiagnosticsService::isSystemOnFire()

File

tests/src/Kernel/DiagnosticCheck/ServiceSmokeAndFireTest.php, line 48

Class

ServiceSmokeAndFireTest
Tests \Drupal\purge\Plugin\Purge\DiagnosticCheck\DiagnosticsService.

Namespace

Drupal\Tests\purge\Kernel\DiagnosticCheck

Code

public function testIsSystemOnFireReturnsCheck() : void {
  $this
    ->initializePurgersService([]);
  $this
    ->initializeService();

  // ERROR level check is expected now because we didn't load any purgers.
  $fire = $this->service
    ->isSystemOnFire();
  $this
    ->assertTrue(is_object($fire));
  if (is_object($fire)) {
    $this
      ->assertTrue($fire instanceof DiagnosticCheckInterface);
  }
}