ILIAS  release_8 Revision v8.24
ilPdfGeneratorConstantsTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
22
27class ilPdfGeneratorConstantsTest extends TestCase
28{
29 public function testInstanceCanBeCreated(): void
30 {
31 $this->assertInstanceOf('ilPDFGenerationConstants', new ilPDFGenerationConstants());
32 }
33
34 public function testGetOrientations(): void
35 {
36 $this->assertCount(2, ilPDFGenerationConstants::getOrientations());
38 $this->assertSame('Portrait', $orientations['Portrait']);
39 $this->assertSame('Landscape', $orientations['Landscape']);
40 }
41
42 public function testGetPageSizesNames(): void
43 {
44 $this->assertCount(15, ilPDFGenerationConstants::getPageSizesNames());
45 }
46
47 public function testHeaderConstants(): void
48 {
49 $this->assertSame(0, ilPDFGenerationConstants::HEADER_NONE);
50 $this->assertSame(1, ilPDFGenerationConstants::HEADER_TEXT);
51 $this->assertSame(2, ilPDFGenerationConstants::HEADER_HTML);
52 }
53
54 public function testFooterConstants(): void
55 {
56 $this->assertSame(0, ilPDFGenerationConstants::FOOTER_NONE);
57 $this->assertSame(1, ilPDFGenerationConstants::FOOTER_TEXT);
58 $this->assertSame(2, ilPDFGenerationConstants::FOOTER_HTML);
59 }
60}