ILIAS  release_7 Revision v7.30-3-g800a261c036
ilPdfGeneratorConstantsTest.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4use PHPUnit\Framework\TestCase;
5
10class ilPdfGeneratorConstantsTest extends TestCase
11{
12 public function testInstanceCanBeCreated()
13 {
14 $this->assertInstanceOf('ilPDFGenerationConstants', new ilPDFGenerationConstants());
15 }
16
17 public function testGetOrientations()
18 {
19 $this->assertCount(2, ilPDFGenerationConstants::getOrientations());
21 $this->assertSame('Portrait', $orientations['Portrait']);
22 $this->assertSame('Landscape', $orientations['Landscape']);
23 }
24
25 public function testGetPageSizesNames()
26 {
27 $this->assertCount(15, ilPDFGenerationConstants::getPageSizesNames());
28 }
29
30 public function testHeaderConstants()
31 {
32 $this->assertSame(0, ilPDFGenerationConstants::HEADER_NONE);
33 $this->assertSame(1, ilPDFGenerationConstants::HEADER_TEXT);
34 $this->assertSame(2, ilPDFGenerationConstants::HEADER_HTML);
35 }
36
37 public function testFooterConstants()
38 {
39 $this->assertSame(0, ilPDFGenerationConstants::FOOTER_NONE);
40 $this->assertSame(1, ilPDFGenerationConstants::FOOTER_TEXT);
41 $this->assertSame(2, ilPDFGenerationConstants::FOOTER_HTML);
42 }
43}
An exception for terminatinating execution or to throw for unit testing.