Beberlei\Bundle\MetricsBundle\Tests\DependencyInjection\BeberleiMetricsExtensionTest::testWithPrometheusAndWithTags PHP Method

testWithPrometheusAndWithTags() public method

    public function testWithPrometheusAndWithTags()
    {
        $expectedTags = array('string_tag' => 'first_value', 'int_tag' => 123);
        $prometheusCollectorRegistryMock = $this->getMockBuilder('\\Prometheus\\CollectorRegistry')->disableOriginalConstructor()->getMock();
        $container = $this->createContainer(array('collectors' => array('prometheus' => array('type' => 'prometheus', 'prometheus_collector_registry' => 'prometheus_collector_registry_mock', 'tags' => $expectedTags))), array('prometheus_collector_registry_mock' => $prometheusCollectorRegistryMock));
        $collector = $container->get('beberlei_metrics.collector.prometheus');
        $this->assertInstanceOf('Beberlei\\Metrics\\Collector\\Prometheus', $collector);
        $this->assertEquals($expectedTags, $this->getProperty($collector, 'tags'));
    }