D
Size: a a a
AK
AK
AK
AK
$func = function ()
{
$args = func_get_args();
$invoiceId = $args[1];
if ($invoiceId != '91570d5e-b8d3-4e47-0176-03977014061b')
{
return null;
}
$invoice = IncomingInvoiceDto::newFromArray(
json_decode(file_get_contents(__DIR__ . '/../../Data/ShipmentUpdate/IncomingInvoiceDto.json'), true));
return $invoice->setItems([]);
};
$this->documentServiceMock->method('getIncomingInvoiceById')->willReturnCallback($func);
$this->documentServiceMock->method('getIncomingInvoiceFromStore')->willReturnCallback($func);
AK
AK
public function setUp(): void
{
$this->documentServiceMock = $this->getMockBuilder(DocumentService::class)
->disableOriginalConstructor()->getMock();
}
AK
protected function tearDown(): void
{
parent::tearDown(); // TODO: Change the autogenerated stub
$this->documentServiceMock = null;
}
AK
AK
AK
СВ