/** * Constructor. * * @param array[] $configs The layout config */ public function __construct(array $configs) { $layouts = array(); foreach ($configs as $config) { $layouts[] = $this->createLayout($config); } parent::__construct($layouts); }
/** * @expectedException \Sonatra\Bundle\MailerBundle\Exception\UnknownLayoutException * @expectedExceptionMessage The "test" layout template does not exist */ public function testLoadUnknownTemplate() { $loader = new ArrayLayoutLoader(array()); $loader->load('test'); }