Google\Cloud\Tests\Snippets\Logging\LoggingClientTest::testCreateMetric PHP Méthode

testCreateMetric() public méthode

public testCreateMetric ( )
    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());
    }