public function testCreateMetric()
{
$snippet = $this->snippetFromMethod(LoggingClient::class, 'createMetric');
$snippet->addLocal('logging', $this->client);
$this->connection->createMetric(Argument::any())->shouldBeCalled()->willReturn([]);
$this->client->setConnection($this->connection->reveal());
$res = $snippet->invoke('metric');
$this->assertInstanceOf(Metric::class, $res->returnVal());
}