You are here

public function LoggerTest::assertNoEntry in MongoDB 8.2

Assert that a given entry is not present in the watchdog.

Parameters

string $message: The message which must not be present in the collection.

1 call to LoggerTest::assertNoEntry()
LoggerTest::testWatchdogLimit in modules/mongodb_watchdog/tests/src/Kernel/LoggerTest.php
Test the default and non-default mongodb_watchdog insertion behaviours.

File

modules/mongodb_watchdog/tests/src/Kernel/LoggerTest.php, line 82

Class

LoggerTest
Class LoggerTest tests the logging mechanism itself.

Namespace

Drupal\Tests\mongodb_watchdog\Kernel

Code

public function assertNoEntry($message) {
  $logged = $this
    ->find($message);
  $this
    ->assertNull($logged, (string) $this
    ->t('Event %message is not logged', [
    '%message' => $message,
  ]));
}