1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Pdf Mocks

This commit is contained in:
David Bomba 2023-02-25 12:17:08 +11:00
parent 7772da95d3
commit 99bcf3a77c
2 changed files with 619 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -59,7 +59,8 @@ class PdfmockTest extends TestCase
public function testHtmlGeneration()
{
$mock = (new PdfMock())->build();
$pdf_mock = (new PdfMock());
$mock = $pdf_mock->build();
$pdf_service = new PdfService($mock->invitation);
@ -83,15 +84,16 @@ class PdfmockTest extends TestCase
$pdf_designer = (new \App\Services\Pdf\PdfDesigner($pdf_service))->build();
$pdf_service->designer = $pdf_designer;
$pdf_service->html_variables = $this->getStubVariables();
$pdf_service->html_variables = $pdf_mock->getStubVariables();
$pdf_builder = (new PdfBuilder($pdf_service))->build();
$pdf_service->builder = $pdf_builder;
$this->assertNotNull($pdf_config);
$html = $pdf_service->getHtml();
nlog($html);
$this->assertNotNull($html);
}
private function getStubVariables()
{
return ['values' => [], 'labels' => []];
}
}