ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
4 require_once __DIR__ . '/../classes/class.ilPDFGenerationConstants.php';
5 
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 }