1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/tests/Pdf/PdfGenerationTest.php

34 lines
504 B
PHP
Raw Normal View History

2019-05-04 05:14:37 +02:00
<?php
namespace Tests\Pdf;
use Spatie\Browsershot\Browsershot;
use Tests\TestCase;
/**
* @test
//@covers App\DataMapper\BaseSettings
*/
class PdfGenerationTest extends TestCase
{
public function setUp() :void
{
parent::setUp();
}
public function testPdfGeneration()
{
$html = file_get_contents(base_path().'/tests/Pdf/invoice.html');
$pdf = base_path().'/tests/Pdf/invoice.pdf';
Browsershot::html($html)->save($pdf);
$this->assertTrue(file_exists($pdf));
}
}