tikiwiki/packages/tiki-pkg-mpdf/setasign/fpdi/tests/unit/FpdiTraitTest.php

30 lines
687 B
PHP
Raw Normal View History

2023-11-20 21:52:04 +01:00
<?php
namespace setasign\Fpdi\unit;
use PHPUnit\Framework\TestCase;
use setasign\Fpdi\FpdiTrait;
abstract class FpdiTraitTest extends TestCase
{
/**
* @return FpdiTrait
*/
abstract public function getInstance();
public function testImportedPageWithoutSettingSourceFile()
{
$fpdi = $this->getInstance();
$this->expectException(\BadMethodCallException::class);
$fpdi->importPage(1);
}
public function testUseImportedPageWithoutSettingSourceFile()
{
$fpdi = $this->getInstance();
$fpdi->AddPage();
$this->expectException(\InvalidArgumentException::class);
$fpdi->useImportedPage(1);
}
}