Fixes for PdfMaker tests

This commit is contained in:
Benjamin Beganović 2020-08-10 18:06:12 +02:00
parent 347ec1d441
commit b5f2ae6d6b
2 changed files with 45 additions and 27 deletions

View File

@ -24,6 +24,8 @@ class PdfMakerDesignsTest extends TestCase
$this->state = [
'variables' => [
'labels' => [],
'values' => [
'$css' => asset('css/tailwindcss@1.4.6.css'),
'$global-margin' => 'm-12',
'$global-padding' => 'p-12',
@ -46,6 +48,7 @@ class PdfMakerDesignsTest extends TestCase
'$entity' => 'Invoice',
],
],
];
}

View File

@ -10,7 +10,10 @@ class PdfMakerTest extends TestCase
{
public $state = [
'template' => [],
'variables' => [],
'variables' => [
'labels' => [],
'values' => [],
],
];
public function testDesignLoadsCorrectly()
@ -63,7 +66,10 @@ class PdfMakerTest extends TestCase
],
],
],
'variables' => [],
'variables' => [
'labels' => [],
'values' => [],
],
];
$maker = new PdfMaker($state);
@ -97,8 +103,11 @@ class PdfMakerTest extends TestCase
],
],
'variables' => [
'labels' => [],
'values' => [
'$title' => 'Invoice Ninja',
],
],
];
$maker = new PdfMaker($state);
@ -139,10 +148,13 @@ class PdfMakerTest extends TestCase
],
],
'variables' => [
'labels' => [],
'values' => [
'$company' => 'Invoice Ninja',
'$email' => 'contact@invoiceninja.com',
'$country' => 'UK',
],
],
];
$maker = new PdfMaker($state);
@ -295,7 +307,10 @@ class PdfMakerTest extends TestCase
]
],
'variables' => [
'labels' => [],
'values' => [
'$title' => 'Invoice Ninja',
],
]
];