/** * {@inheritdoc} */ public function load($name) { if (is_array($this->resources)) { foreach ($this->resources as $resource) { $config = ConfigUtil::formatTranslationConfig($resource, $this->kernel); $this->addLayout($this->createLayout($config)); } $this->resources = null; } return parent::load($name); }
/** * @expectedException \Sonatra\Bundle\MailerBundle\Exception\UnknownLayoutException * @€@expectedExceptionMessage The "test" layout template does not exist */ public function testLoadUnknownTemplate() { $loader = new ConfigLayoutLoader(array()); $loader->load('test'); }