◆ testFetchFormats()
ilPageFormatsTest::testFetchFormats |
( |
| ) |
|
Definition at line 9 of file ilPageFormatsTest.php.
References $formats.
11 $languageMock = $this->getMockBuilder(
'ilLanguage')
12 ->disableOriginalConstructor()
13 ->setMethods(array(
'txt'))
16 $languageMock->method(
'txt')
18 array(
'certificate_a4'),
19 array(
'certificate_a4_landscape'),
20 array(
'certificate_a5'),
21 array(
'certificate_a5_landscape'),
22 array(
'certificate_letter'),
23 array(
'certificate_letter_landscape'),
24 array(
'certificate_custom')
26 ->willReturn(
'Some Translation');
30 $formats = $pageFormats->fetchPageFormats();
32 $this->assertEquals(
'a4',
$formats[
'a4'][
'value']);
33 $this->assertEquals(
'210mm',
$formats[
'a4'][
'width']);
35 $this->assertEquals(
'297mm',
$formats[
'a4'][
'height']);
36 $this->assertEquals(
'Some Translation',
$formats[
'a4'][
'name']);
38 $this->assertEquals(
'a4landscape',
$formats[
'a4landscape'][
'value']);
39 $this->assertEquals(
'297mm',
$formats[
'a4landscape'][
'width']);
40 $this->assertEquals(
'210mm',
$formats[
'a4landscape'][
'height']);
41 $this->assertEquals(
'Some Translation',
$formats[
'a4landscape'][
'name']);
43 $this->assertEquals(
'a5',
$formats[
'a5'][
'value']);
44 $this->assertEquals(
'148mm',
$formats[
'a5'][
'width']);
45 $this->assertEquals(
'210mm',
$formats[
'a5'][
'height']);
46 $this->assertEquals(
'Some Translation',
$formats[
'a5'][
'name']);
48 $this->assertEquals(
'a5landscape',
$formats[
'a5landscape'][
'value']);
49 $this->assertEquals(
'210mm',
$formats[
'a5landscape'][
'width']);
50 $this->assertEquals(
'148mm',
$formats[
'a5landscape'][
'height']);
51 $this->assertEquals(
'Some Translation',
$formats[
'a5landscape'][
'name']);
53 $this->assertEquals(
'letter',
$formats[
'letter'][
'value']);
54 $this->assertEquals(
'8.5in',
$formats[
'letter'][
'width']);
55 $this->assertEquals(
'11in',
$formats[
'letter'][
'height']);
56 $this->assertEquals(
'Some Translation',
$formats[
'letter'][
'name']);
58 $this->assertEquals(
'letterlandscape',
$formats[
'letterlandscape'][
'value']);
59 $this->assertEquals(
'11in',
$formats[
'letterlandscape'][
'width']);
60 $this->assertEquals(
'8.5in',
$formats[
'letterlandscape'][
'height']);
61 $this->assertEquals(
'Some Translation',
$formats[
'letterlandscape'][
'name']);
63 $this->assertEquals(
'custom',
$formats[
'custom'][
'value']);
64 $this->assertEquals(
'',
$formats[
'custom'][
'width']);
65 $this->assertEquals(
'',
$formats[
'custom'][
'height']);
66 $this->assertEquals(
'Some Translation',
$formats[
'custom'][
'name']);
The documentation for this class was generated from the following file: