mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
34 lines
504 B
PHP
34 lines
504 B
PHP
|
<?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));
|
||
|
|
||
|
}
|
||
|
}
|