public function test_with_dl_and_unroutable() { $config = new Configuration\FromArray(['my_vhost' => ['parameters' => ['with_dl' => true, 'with_unroutable' => true]]]); $this->assertSame('my_vhost', $config->getVhost()); $this->assertTrue($config->hasDeadLetterExchange()); $this->assertTrue($config->hasUnroutableExchange()); }
public function __construct($filePath) { if (!file_exists($filePath)) { throw new \InvalidArgumentException(sprintf('File "%s" doesn\'t exist', $filePath)); } $yaml = new Parser(); $configuration = $yaml->parse(file_get_contents($filePath)); parent::__construct($configuration); }