public function testWarning()
{
$snippet = $this->snippetFromMethod(PsrLogger::class, 'warning');
$snippet->addLocal('psrLogger', $this->psr);
$this->connection->writeEntries(Argument::that(function ($args) {
if ($args['entries'][0]['severity'] !== Logger::WARNING) {
return false;
}
return true;
}))->shouldBeCalled();
$this->psr->setConnection($this->connection->reveal());
$snippet->invoke();
}