Beispiel #1
0
 public function testGetOrder()
 {
     $orderId = 100000041;
     $this->model->setOrderId($orderId);
     $entityName = 'invoice';
     $this->orderMock->expects($this->atLeastOnce())->method('setHistoryEntityName')->with($entityName)->will($this->returnSelf());
     $this->assertEquals($this->orderMock, $this->model->getOrder());
 }
Beispiel #2
0
 public function testGetOrderLoadedById()
 {
     $orderId = 100000041;
     $this->modelWithoutOrder->setOrderId($orderId);
     $this->orderMock->expects($this->once())->method('load')->with($orderId)->willReturnSelf();
     $this->orderMock->expects($this->once())->method('setHistoryEntityName')->with($this->entityType)->willReturnSelf();
     $this->orderFactory->expects($this->once())->method('create')->willReturn($this->orderMock);
     $this->assertEquals($this->orderMock, $this->modelWithoutOrder->getOrder());
 }