You are here

private static function WatchdogCheckTest::expectWatchdog in Nagios Monitoring 8

5 calls to WatchdogCheckTest::expectWatchdog()
WatchdogCheckTest::assertAllGreen in tests/src/Kernel/WatchdogCheckTest.php
WatchdogCheckTest::testFilter in tests/src/Kernel/WatchdogCheckTest.php
WatchdogCheckTest::testOrder in tests/src/Kernel/WatchdogCheckTest.php
WatchdogCheckTest::testWithLevelError in tests/src/Kernel/WatchdogCheckTest.php
WatchdogCheckTest::testWithLevelWarning in tests/src/Kernel/WatchdogCheckTest.php

File

tests/src/Kernel/WatchdogCheckTest.php, line 48

Class

WatchdogCheckTest
Tests the functionality to report dblog/watchdog entries.

Namespace

Drupal\Tests\nagios\Kernel

Code

private static function expectWatchdog($expected) {
  $actual = nagios_check_watchdog()['data'];
  $actual['text'] = preg_replace('/\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2} /', '', $actual['text']);
  self::assertEquals($expected, $actual);
}