Google\Cloud\Tests\Logging\MetricTest::testUpdatesDataWithoutCachedData PHP Méthode

testUpdatesDataWithoutCachedData() public méthode

    public function testUpdatesDataWithoutCachedData()
    {
        $this->connection->updateMetric($this->metricData + ['metricName' => $this->formattedName])->willReturn($this->metricData)->shouldBeCalledTimes(1);
        $this->connection->getMetric(Argument::any())->willReturn(['description' => 'another description'])->shouldBeCalledTimes(1);
        $metric = $this->getMetric($this->connection);
        $metric->update($this->metricData);
        $this->assertEquals($this->metricData['description'], $metric->info()['description']);
    }