raigu/psr3-log-spy

Spy of PSR-3 LoggerInterface for testing

v0.1.1 2021-08-29 17:33 UTC

This package is auto-updated.

Last update: 2024-11-29 06:35:46 UTC


README

Latest Stable Version Fallows SemVer build codecov License: MIT

psr3-log-spy

An implementation of PSR-3 LoggerInterface for spying on a subject under test (SUT) to verify that the SUT is using the given logger.

Compatibility

  • PHP 7.4, ^8.0
  • psr/log ^1.1||2.0.0

Changes

./CHANGELOG.md

Install

$ composer require --dev raigu/psr3-log-spy

Usage

$spy = new \Raigu\TestDouble\Psr3\LoggerSpy();

$sut = new Foo($spy);
$sut->bar();

assert($spy->any());

Methods

Testing

$ composer test
$ composer specification 
$ composer coverage