Beberlei\Metrics\Tests\Collector\PrometheusTest::testMeasure PHP Method

testMeasure() public method

public testMeasure ( )
    public function testMeasure()
    {
        $expectedVariableValue = 123;
        $gaugeMock = $this->getMockBuilder('\\Prometheus\\Gauge')->disableOriginalConstructor()->getMock();
        $gaugeMock->expects($this->once())->method('set')->with($expectedVariableValue, array());
        $this->collectorRegistryMock->expects($this->once())->method('getGauge')->with(self::TEST_NAMESPACE, self::TEST_VARIABLE_NAME)->willReturn($gaugeMock);
        $this->collector->measure(self::TEST_VARIABLE_NAME, $expectedVariableValue);
        $this->collector->flush();
    }