public function testWriteFactory()
{
$snippet = $this->snippetFromMethod(Logger::class, 'write', 2);
$snippet->addLocal('logger', $this->logger);
$this->connection->writeEntries(Argument::any())->shouldBeCalled();
$this->logger->setConnection($this->connection->reveal());
$res = $snippet->invoke();
}