mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fixes for tests
This commit is contained in:
parent
822aed5a61
commit
00ff163d4f
@ -43,9 +43,7 @@ class EInvoiceTest extends TestCase
|
|||||||
$this->invoice->client->routing_id = 'DE123456789';
|
$this->invoice->client->routing_id = 'DE123456789';
|
||||||
$this->invoice->client->save();
|
$this->invoice->client->save();
|
||||||
$e_invoice = (new CreateEInvoice($this->invoice))->handle();
|
$e_invoice = (new CreateEInvoice($this->invoice))->handle();
|
||||||
(new \App\Jobs\Invoice\MergeEInvoice($this->invoice))->handle();
|
$this->assertIsString($e_invoice);
|
||||||
$this->assertNotNull($e_invoice);
|
|
||||||
$this->assertTrue(Storage::exists($e_invoice));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,7 +56,7 @@ class EInvoiceTest extends TestCase
|
|||||||
$this->invoice->client->save();
|
$this->invoice->client->save();
|
||||||
|
|
||||||
$e_invoice = (new CreateEInvoice($this->invoice))->handle();
|
$e_invoice = (new CreateEInvoice($this->invoice))->handle();
|
||||||
$document = ZugferdDocumentReader::readAndGuessFromFile(Storage::path($e_invoice));
|
$document = ZugferdDocumentReader::readAndGuessFromContent($e_invoice);
|
||||||
$document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $documentcurrency, $taxcurrency, $taxname, $documentlangeuage, $rest);
|
$document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $documentcurrency, $taxcurrency, $taxname, $documentlangeuage, $rest);
|
||||||
$this->assertEquals($this->invoice->number, $documentno);
|
$this->assertEquals($this->invoice->number, $documentno);
|
||||||
}
|
}
|
||||||
@ -69,9 +67,7 @@ class EInvoiceTest extends TestCase
|
|||||||
public function checkEmbededPDFFile()
|
public function checkEmbededPDFFile()
|
||||||
{
|
{
|
||||||
$pdf = (new CreateEntityPdf($this->invoice->invitations()->first()))->handle();
|
$pdf = (new CreateEntityPdf($this->invoice->invitations()->first()))->handle();
|
||||||
(new CreateEInvoice($this->invoice))->handle();
|
$document = ZugferdDocumentReader::readAndGuessFromContent($pdf);
|
||||||
(new \App\Jobs\Invoice\MergeEInvoice($this->invoice))->handle();
|
|
||||||
$document = ZugferdDocumentReader::readAndGuessFromFile($pdf);
|
|
||||||
$document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $documentcurrency, $taxcurrency, $taxname, $documentlangeuage, $rest);
|
$document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $documentcurrency, $taxcurrency, $taxname, $documentlangeuage, $rest);
|
||||||
$this->assertEquals($this->invoice->number, $documentno);
|
$this->assertEquals($this->invoice->number, $documentno);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user