Skip to content

Commit

Permalink
Tests: fix coverage generator
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Jul 24, 2023
1 parent da3c855 commit a84bf42
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions tests/Cases/PdfResponse.page.format.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ $origData = file_get_contents(__DIR__ . '/templates/example1.htm');
Toolkit::test(function () use ($origData): void {
$fileResponse = new PdfResponse($origData);
$fileResponse->setSaveMode(PdfResponse::INLINE);
$fileResponse->pageOrientation = PdfResponse::ORIENTATION_LANDSCAPE;
$fileResponse->pageFormat = 'A4-L';
$fileResponse->pageMargins = $fileResponse->getPageMargins();
$fileResponse->setPageOrientation(PdfResponse::ORIENTATION_LANDSCAPE);
$fileResponse->setPageFormat('A4-L');
$fileResponse->setPageMargins($fileResponse->getPageMargins());

ob_start();
$fileResponse->send(new Request(new UrlScript()), new Response());
Expand All @@ -38,11 +38,6 @@ Toolkit::test(function () use ($origData): void {
InvalidStateException::class,
'mPDF instance already created. Set page orientation before calling getMPDF'
);
});

Toolkit::test(function () use ($origData): void {
$fileResponse = new PdfResponse($origData);
$fileResponse->getMPDF();

Assert::exception(
function () use ($fileResponse): void {
Expand All @@ -51,11 +46,6 @@ Toolkit::test(function () use ($origData): void {
InvalidStateException::class,
'mPDF instance already created. Set page format before calling getMPDF'
);
});

Toolkit::test(function () use ($origData): void {
$fileResponse = new PdfResponse($origData);
$fileResponse->getMPDF();

Assert::exception(
function () use ($fileResponse): void {
Expand Down

0 comments on commit a84bf42

Please sign in to comment.