コード例 #1
0
 /**
  * Constructor.
  *
  * @param array[]               $configs      The mail config
  * @param LayoutLoaderInterface $layoutLoader The layout loader
  */
 public function __construct(array $configs, LayoutLoaderInterface $layoutLoader)
 {
     $this->layoutLoader = $layoutLoader;
     $mails = array();
     foreach ($configs as $config) {
         $mails[] = $this->createMail($config);
     }
     parent::__construct($mails);
 }
コード例 #2
0
 /**
  * @expectedException \Sonatra\Bundle\MailerBundle\Exception\UnknownMailException
  * @expectedExceptionMessage The "test" mail template does not exist with the "all" type
  */
 public function testLoadUnknownTemplate()
 {
     $loader = new ArrayMailLoader(array());
     $loader->load('test');
 }