public function testMetric() { $snippet = $this->snippetFromMethod(LoggingClient::class, 'metric'); $snippet->addLocal('logging', $this->client); $res = $snippet->invoke('metric'); $this->assertInstanceOf(Metric::class, $res->returnVal()); }