/** * @param int $id * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function hold($id) { return $this->orderHold->invoke($id); }
/** * test order hold service */ public function testInvoke() { $this->orderRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->orderMock)); $this->orderMock->expects($this->once())->method('hold')->will($this->returnSelf()); $this->assertTrue($this->orderHold->invoke(1)); }
/** * test order hold */ public function testHold() { $this->orderHoldMock->expects($this->once())->method('invoke')->with(1)->will($this->returnValue(true)); $this->assertTrue($this->orderWrite->hold(1)); }