Google\Cloud\Tests\Snippets\Logging\MetricTest::testUpdate PHP Method

testUpdate() public method

public testUpdate ( )
    public function testUpdate()
    {
        $snippet = $this->snippetFromMethod(Metric::class, 'update');
        $snippet->addLocal('metric', $this->metric);
        $this->connection->updateMetric(Argument::any(), Argument::any())->shouldBeCalled()->willReturn([]);
        $this->connection->getMetric(Argument::any())->shouldBeCalled()->willReturn(['description' => 'Foo']);
        $this->metric->setConnection($this->connection->reveal());
        $snippet->invoke();
    }