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

44 lines
870 B
PHP
Raw Normal View History

2019-05-04 05:14:37 +02:00
<?php
2020-09-14 13:11:46 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
2019-05-04 05:14:37 +02:00
namespace Tests\Pdf;
2020-12-23 16:17:05 +01:00
use Beganovich\Snappdf\Snappdf;
2019-05-04 05:14:37 +02:00
use Tests\TestCase;
/**
* @test
//@covers App\DataMapper\BaseSettings
*/
class PdfGenerationTest extends TestCase
{
public function setUp(): void
2019-05-04 05:14:37 +02:00
{
parent::setUp();
}
public function testPdfGeneration()
{
$pdf = new Snappdf();
if (config('ninja.snappdf_chromium_path')) {
$pdf->setChromiumPath(config('ninja.snappdf_chromium_path'));
}
2019-05-04 08:55:19 +02:00
$pdf = $pdf
2020-12-23 16:17:05 +01:00
->setHtml('<h1>Invoice Ninja</h1>')
->generate();
2019-05-04 08:55:19 +02:00
2020-12-23 16:17:05 +01:00
$this->assertNotNull($pdf);
}
2019-05-04 05:14:37 +02:00
}