Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TestLogger.php

function TestLogger::hasRecordThatMatches

File

vendor/colinodell/psr-testlogger/src/TestLogger.php, line 123

Class

TestLogger
Used for testing purposes.

Namespace

ColinODell\PsrTestLogger

Code

public function hasRecordThatMatches(string $regex, string|int|null $level = null) : bool {
    return $this->hasRecordThatPasses(static function ($rec) use ($regex) {
        return \preg_match($regex, (string) $rec['message']) > 0;
    }, $level);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal