Not really sure, but maybe something like done in Monolog https://github.com/Seldaek/monolog/blob/master/tests/Monolog/LoggerTest.php#L358