mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Adjust state & make tests green
This commit is contained in:
parent
94976054dd
commit
92b2295db1
@ -18,7 +18,7 @@ class PdfMaker
|
||||
|
||||
private $xpath;
|
||||
|
||||
public function __construct(array $data = [])
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
|
@ -6,9 +6,14 @@ use Tests\TestCase;
|
||||
|
||||
class PdfMakerTest extends TestCase
|
||||
{
|
||||
public $state = [
|
||||
'template' => [],
|
||||
'variables' => [],
|
||||
];
|
||||
|
||||
public function testDesignLoadsCorrectly()
|
||||
{
|
||||
$maker = new PdfMaker();
|
||||
$maker = new PdfMaker($this->state);
|
||||
|
||||
$maker->design(Business::class);
|
||||
|
||||
@ -17,18 +22,18 @@ class PdfMakerTest extends TestCase
|
||||
|
||||
public function testHtmlDesignLoadsCorrectly()
|
||||
{
|
||||
$maker = new PdfMaker();
|
||||
$maker = new PdfMaker($this->state);
|
||||
|
||||
$maker
|
||||
->design(Business::class)
|
||||
->build();
|
||||
|
||||
$this->assertStringContainsString('<!-- Business -->', $maker->html);
|
||||
$this->assertStringContainsString('<!-- Business -->', $maker->getCompiledHTML());
|
||||
}
|
||||
|
||||
public function testGetSectionUtility()
|
||||
{
|
||||
$maker = new PdfMaker();
|
||||
$maker = new PdfMaker($this->state);
|
||||
|
||||
$maker
|
||||
->design(Business::class)
|
||||
|
Loading…
x
Reference in New Issue
Block a user