public function testSetTemplateOptions() { $templateOptions = ['opt1', 'opt2']; $this->template->setTemplateOptions($templateOptions); $result = $this->template->getTemplateOptions(); $this->assertEquals($templateOptions, $result); }
/** * @param Order $order * @return void */ protected function prepareTemplate(Order $order) { $this->templateContainer->setTemplateOptions($this->getTemplateOptions()); if ($order->getCustomerIsGuest()) { $templateId = $this->identityContainer->getGuestTemplateId(); $customerName = $order->getBillingAddress()->getName(); } else { $templateId = $this->identityContainer->getTemplateId(); $customerName = $order->getCustomerName(); } $this->identityContainer->setCustomerName($customerName); $this->identityContainer->setCustomerEmail($order->getCustomerEmail()); $this->templateContainer->setTemplateId($templateId); }