Ejemplo n.º 1
0
 protected function getCustomer()
 {
     $this->customerBuilderMock->expects($this->once())->method('setDob')->with($this->orderData['customerDob'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setEmail')->with($this->orderData['customerEmail'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setFirstname')->with($this->orderData['customerFirstName'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setGender')->with($this->orderData['customerGender'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setGroupId')->with($this->orderData['customerGroupId'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setId')->with($this->orderData['customerId'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setIsGuest')->with($this->orderData['customerIsGuest'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setLastname')->with($this->orderData['customerLastName'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setMiddlename')->with($this->orderData['customerMiddleName'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setNote')->with($this->orderData['customerNote'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setNoteNotify')->with($this->orderData['customerNotify'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setPrefix')->with($this->orderData['customerPrefix'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setSuffix')->with($this->orderData['customerSuffix'])->will($this->returnSelf());
     $this->customerBuilderMock->expects($this->once())->method('setTaxvat')->with($this->orderData['customerTaxvat'])->will($this->returnSelf());
     $customer = $this->getMock('Magento\\Sales\\Model\\Order\\Customer', [], [], '', false);
     $this->customerBuilderMock->expects($this->once())->method('create')->will($this->returnValue($customer));
     return $customer;
 }