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

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

public testWithGraphite ( )
    public function testWithGraphite()
    {
        $container = $this->createContainer(array('default' => 'simple', 'collectors' => array('simple' => array('type' => 'graphite'), 'full' => array('type' => 'graphite', 'host' => 'graphite.localhost', 'port' => 1234, 'protocol' => 'udp'))));
        $collector = $container->get('beberlei_metrics.collector.simple');
        $this->assertInstanceOf('Beberlei\\Metrics\\Collector\\Graphite', $collector);
        $this->assertSame('tcp', $this->getProperty($collector, 'protocol'));
        $this->assertSame('localhost', $this->getProperty($collector, 'host'));
        $this->assertSame(2003, $this->getProperty($collector, 'port'));
        $collector = $container->get('beberlei_metrics.collector.full');
        $this->assertInstanceOf('Beberlei\\Metrics\\Collector\\Graphite', $collector);
        $this->assertSame('udp', $this->getProperty($collector, 'protocol'));
        $this->assertSame('graphite.localhost', $this->getProperty($collector, 'host'));
        $this->assertSame(1234, $this->getProperty($collector, 'port'));
    }