public function testWithZabbix()
{
$container = $this->createContainer(array('default' => 'simple', 'collectors' => array('simple' => array('type' => 'zabbix'), 'full' => array('type' => 'zabbix', 'prefix' => 'foo.beberlei.de', 'host' => 'zabbix.localhost', 'port' => 1234), 'file' => array('type' => 'zabbix', 'prefix' => 'foo.beberlei.de', 'file' => '/etc/zabbix/zabbix_agentd.conf'))));
$collector = $container->get('beberlei_metrics.collector.simple');
$this->assertInstanceOf('Beberlei\\Metrics\\Collector\\Zabbix', $collector);
$this->assertSame(gethostname(), $this->getProperty($collector, 'prefix'));
$sender = $this->getProperty($collector, 'sender');
$this->assertInstanceOf('Net\\Zabbix\\Sender', $sender);
$this->assertSame('localhost', $this->getProperty($sender, '_servername'));
$this->assertSame(10051, $this->getProperty($sender, '_serverport'));
$collector = $container->get('beberlei_metrics.collector.full');
$this->assertInstanceOf('Beberlei\\Metrics\\Collector\\Zabbix', $collector);
$this->assertSame('foo.beberlei.de', $this->getProperty($collector, 'prefix'));
$sender = $this->getProperty($collector, 'sender');
$this->assertInstanceOf('Net\\Zabbix\\Sender', $sender);
$this->assertSame('zabbix.localhost', $this->getProperty($sender, '_servername'));
$this->assertSame(1234, $this->getProperty($sender, '_serverport'));
$collector = $container->get('beberlei_metrics.collector.file');
$this->assertInstanceOf('Beberlei\\Metrics\\Collector\\Zabbix', $collector);
$this->assertSame('foo.beberlei.de', $this->getProperty($collector, 'prefix'));
$sender = $this->getProperty($collector, 'sender');
$this->assertInstanceOf('Net\\Zabbix\\Sender', $sender);
}