public function testLogPlaceholder()
{
$snippet = $this->snippetFromMethod(PsrLogger::class, 'log', 1);
$snippet->addLocal('psrLogger', $this->psr);
$this->connection->writeEntries(Argument::that(function ($args) {
if ($args['entries'][0]['severity'] !== Logger::ALERT) {
return false;
}
if ($args['entries'][0]['jsonPayload']['message'] !== 'alert: my alert message') {
return false;
}
return true;
}))->shouldBeCalled();
$this->psr->setConnection($this->connection->reveal());
$snippet->invoke();
}