raigu / psr3-log-spy
Spy of PSR-3 LoggerInterface for testing
v0.1.1
2021-08-29 17:33 UTC
Requires
- php: >=7.4||^8.0
- psr/log: ^1.1||2.0.0
Requires (Dev)
- phpunit/phpunit: ^9.5
Provides
- psr/log-implementation: ^1.0||^2.0
README
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
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