Пример #1
0
 /**
  * Run test notify method
  */
 public function testNotify()
 {
     $id = 123;
     $returnValue = 'return-value';
     $modelMock = $this->getMockForAbstractClass('Magento\\Sales\\Model\\AbstractModel', [], '', false);
     $this->repositoryMock->expects($this->once())->method('get')->with($id)->will($this->returnValue($modelMock));
     $this->notifierMock->expects($this->once())->method('notify')->with($modelMock)->will($this->returnValue($returnValue));
     $this->assertEquals($returnValue, $this->shipmentService->notify($id));
 }