You are here

public function ServiceTest::testIsSystemOnFire in Purge 8.3

Tests DiagnosticsService::isSystemOnFire.

File

tests/src/Kernel/DiagnosticCheck/ServiceTest.php, line 204

Class

ServiceTest
Tests DiagnosticsService.

Namespace

Drupal\Tests\purge\Kernel\DiagnosticCheck

Code

public function testIsSystemOnFire() : void {
  $this
    ->initializePurgersService([
    'ida' => 'a',
  ]);
  $this->service
    ->reload();
  $this
    ->assertTrue($this->service
    ->isSystemOnFire() instanceof DiagnosticCheckInterface);
  $possibilities = [
    'alwayserror',
    'maxage',
  ];
  $this
    ->assertTrue(in_array($this->service
    ->isSystemOnFire()
    ->getPluginId(), $possibilities));
}