mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Pdf Mocks
This commit is contained in:
parent
7772da95d3
commit
99bcf3a77c
File diff suppressed because one or more lines are too long
@ -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' => []];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user