Ejemplo n.º 1
0
 /**
  * @return void
  */
 public function setUp()
 {
     $customer = new SpyCustomer();
     $customer->setFirstName('firstname');
     $customer->setLastName('lastname');
     $customer->setEmail('*****@*****.**');
     $customer->setCustomerReference('reference');
     $customer->save();
     $this->customer = $customer;
     $customerBusinessFactory = $this->getBusinessFactory();
     $customerFacade = new CustomerFacade();
     $customerFacade->setFactory($customerBusinessFactory);
     $controllerMock = $this->getMockBuilder(EditController::class)->setMethods(['getFactory', 'getFacade'])->getMock();
     $controllerMock->method('getFactory')->willReturn(new CustomerCommunicationFactory());
     $controllerMock->method('getFacade')->willReturn($customerFacade);
     $this->controller = $controllerMock;
 }
Ejemplo n.º 2
0
 /**
  * @param \Spryker\Shared\Transfer\TransferInterface|null $transfer
  * @param bool $hasEmail
  *
  * @return \Spryker\Zed\Customer\Business\CustomerFacade
  */
 private function getFacade(TransferInterface $transfer = null, $hasEmail = true)
 {
     $customerFacade = new CustomerFacade();
     $customerFacade->setFactory($this->getFactory($transfer, $hasEmail));
     return $customerFacade;
 }
Ejemplo n.º 3
0
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->customerFacade = new CustomerFacade();
     $this->customerFacade->setFactory($this->getBusinessFactory());
 }