PHP code example of raigu / psr3-log-spy

1. Go to this page and download the library: Download raigu/psr3-log-spy library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

raigu / psr3-log-spy example snippets


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

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

assert($spy->any());