Beberlei\Bundle\MetricsBundle\Tests\DependencyInjection\BeberleiMetricsExtensionTest::testWithInfluxDBAndWithTags PHP Метод

testWithInfluxDBAndWithTags() публичный Метод

    public function testWithInfluxDBAndWithTags()
    {
        $expectedTags = array('string_tag' => 'first_value', 'int_tag' => 123);
        $influxDBClientMock = $this->getMockBuilder('InfluxDB\\Client')->disableOriginalConstructor()->getMock();
        $container = $this->createContainer(array('collectors' => array('influxdb' => array('type' => 'influxdb', 'influxdb_client' => 'influxdb_client_mock', 'tags' => $expectedTags))), array('influxdb_client_mock' => $influxDBClientMock));
        $collector = $container->get('beberlei_metrics.collector.influxdb');
        $this->assertInstanceOf('Beberlei\\Metrics\\Collector\\InfluxDB', $collector);
        $this->assertEquals($expectedTags, $this->getProperty($collector, 'tags'));
    }