You are here

public function TestLogger::hasRecordThatPasses in Lockr 7.3

3 calls to TestLogger::hasRecordThatPasses()
TestLogger::hasRecord in vendor/psr/log/Psr/Log/Test/TestLogger.php
TestLogger::hasRecordThatContains in vendor/psr/log/Psr/Log/Test/TestLogger.php
TestLogger::hasRecordThatMatches in vendor/psr/log/Psr/Log/Test/TestLogger.php

File

vendor/psr/log/Psr/Log/Test/TestLogger.php, line 116

Class

TestLogger
Used for testing purposes.

Namespace

Psr\Log\Test

Code

public function hasRecordThatPasses(callable $predicate, $level) {
  if (!isset($this->recordsByLevel[$level])) {
    return false;
  }
  foreach ($this->recordsByLevel[$level] as $i => $rec) {
    if (call_user_func($predicate, $rec, $i)) {
      return true;
    }
  }
  return false;
}