4 require_once __DIR__ .
'/../classes/renderer/phantomjs/class.ilPhantomJSRenderer.php';
5 define(
"PATH_TO_PHANTOMJS",
'');
15 'javascript_delay' => 200,
17 'orientation' =>
'Portrait',
20 'header_height' =>
'0cm',
21 'header_show_pages' => 0,
24 'footer_height' =>
'0cm',
25 'footer_show_pages' => 0,
32 'javascript_delay' => 200,
33 'orientation' =>
'Portrait',
37 'header_height' =>
'0cm',
38 'header_show_pages' => 0,
41 'footer_height' =>
'0cm',
42 'footer_show_pages' => 0,
48 $method = $class->getMethod(
$name);
49 $method->setAccessible(
true);
56 $this->assertInstanceOf(
'ilPhantomJSRenderer', $transformer);
63 $config = $obj->getDefaultConfig(
'Bla',
'Blubb');
64 $this->assertSame($this->default_config,
$config);
69 $transformer = self::getMethod(
'getCommandLineConfig');
72 $this->assertSame(
'"{\"page_size\":\"A4\",\"orientation\":\"Portrait\",\"margin\":\"1cm\",\"delay\":200,\"viewport\":\"\",\"header\":null,\"footer\":null,\"page_type\":0}"', $transformer->invokeArgs($obj,
array(
$config)));
77 $transformer = self::getMethod(
'getCommandLineConfig');
81 $config[
'header_text'] =
'Hello';
82 $config[
'header_height'] =
'1cm';
84 $config[
'header_show_pages'] =
false;
86 $this->assertSame(
'"{\"page_size\":\"A4\",\"orientation\":\"Portrait\",\"margin\":\"1cm\",\"delay\":200,\"viewport\":\"\",\"header\":{\"text\":\"Hello\",\"height\":\"1cm\",\"show_pages\":false},\"footer\":null,\"page_type\":0}"', $transformer->invokeArgs($obj,
array(
$config)));
91 $transformer = self::getMethod(
'getCommandLineConfig');
95 $config[
'footer_text'] =
'Hello';
96 $config[
'footer_height'] =
'1cm';
98 $config[
'footer_show_pages'] =
true;
100 $this->assertSame(
'"{\"page_size\":\"A4\",\"orientation\":\"Portrait\",\"margin\":\"1cm\",\"delay\":200,\"viewport\":\"\",\"header\":null,\"footer\":{\"text\":\"Hello\",\"height\":\"1cm\",\"show_pages\":true},\"page_type\":0}"', $transformer->invokeArgs($obj,
array(
$config)));
105 $transformer = self::getMethod(
'getCommandLineConfig');
109 $config[
'footer_text'] =
'Hello';
110 $config[
'footer_height'] =
'1cm';
112 $config[
'footer_show_pages'] =
false;
114 $this->assertSame(
'"{\"page_size\":\"A4\",\"orientation\":\"Portrait\",\"margin\":\"1cm\",\"delay\":200,\"viewport\":\"\",\"header\":null,\"footer\":{\"text\":\"Hello\",\"height\":\"1cm\",\"show_pages\":false},\"page_type\":0}"', $transformer->invokeArgs($obj,
array(
$config)));
testHeaderSettingsWithoutPageNumber()
testInstanceCanBeCreated()
testBeckerscheSettingsText()
testFooterSettingsTextWithoutPageNumber()
Create styles array
The data for the language used.