Esempio n. 1
0
 /**
  * @param int $id
  * @return \Magento\Sales\Service\V1\Data\Order
  * @throws \Magento\Framework\Exception\NoSuchEntityException
  */
 public function get($id)
 {
     return $this->orderGet->invoke($id);
 }
Esempio n. 2
0
 /**
  * test order get
  */
 public function testGet()
 {
     $this->orderGetMock->expects($this->once())->method('invoke')->with(1)->will($this->returnValue('order-do'));
     $this->assertEquals('order-do', $this->orderRead->get(1));
 }
Esempio n. 3
0
 /**
  * test order list service
  */
 public function testInvoke()
 {
     $this->orderRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->orderMock));
     $this->orderMapperMock->expects($this->once())->method('extractDto')->with($this->equalTo($this->orderMock))->will($this->returnValue($this->dataObjectMock));
     $this->assertEquals($this->dataObjectMock, $this->orderGet->invoke(1));
 }