4 require_once __DIR__ .
'/../classes/renderer/phantomjs/class.ilPhantomJSRenderer.php';
5 require_once
'Services/Form/classes/class.ilTextInputGUI.php';
6 require_once
'Services/Form/classes/class.ilCheckboxInputGUI.php';
7 require_once
'Services/Form/classes/class.ilSelectInputGUI.php';
8 require_once
'Services/Form/classes/class.ilFormSectionHeaderGUI.php';
9 require_once
'Services/Language/classes/class.ilLanguage.php';
10 require_once
'libs/composer/vendor/pimple/pimple/src/Pimple/Container.php';
11 require_once
'src/DI/Container.php';
26 $this->
callMethod($this->form,
'setLanguage', array($this->lng));
41 $DIC[
$name] =
function (
$c) use ($name) {
50 $this->lng = $this->getMockBuilder(
'ilLanguage')
51 ->disableOriginalConstructor()
53 $this->lng->method(
'txt')
54 ->will($this->returnArgument(0));
60 $method = $class->getMethod(
$name);
61 $method->setAccessible(
true);
68 $method = $class->getMethod(
$name);
69 $method->setAccessible(
true);
70 return $method->invokeArgs($obj, $args);
75 $transformer = self::getMethod(
'buildJavascriptDelayForm');
76 $this->assertInstanceOf(
'ilTextInputGUI', $transformer->invokeArgs($this->form, array()));
77 $this->assertSame(
'javascript_delay', $transformer->invokeArgs($this->form, array())->getTitle());
78 $this->assertSame(
'javascript_delay', $transformer->invokeArgs($this->form, array())->getPostVar());
83 $transformer = self::getMethod(
'buildMarginForm');
84 $this->assertInstanceOf(
'ilTextInputGUI', $transformer->invokeArgs($this->form, array()));
85 $this->assertSame(
'margin', $transformer->invokeArgs($this->form, array())->getTitle());
86 $this->assertSame(
'margin', $transformer->invokeArgs($this->form, array())->getPostVar());
91 $transformer = self::getMethod(
'buildFooterHeightForm');
92 $this->assertInstanceOf(
'ilTextInputGUI', $transformer->invokeArgs($this->form, array()));
93 $this->assertSame(
'footer_height', $transformer->invokeArgs($this->form, array())->getTitle());
94 $this->assertSame(
'footer_height', $transformer->invokeArgs($this->form, array())->getPostVar());
99 $transformer = self::getMethod(
'buildFooterTextForm');
100 $this->assertInstanceOf(
'ilTextInputGUI', $transformer->invokeArgs($this->form, array()));
101 $this->assertSame(
'footer_text', $transformer->invokeArgs($this->form, array())->getTitle());
102 $this->assertSame(
'footer_text', $transformer->invokeArgs($this->form, array())->getPostVar());
107 $transformer = self::getMethod(
'buildHeaderHeightForm');
108 $this->assertInstanceOf(
'ilTextInputGUI', $transformer->invokeArgs($this->form, array()));
109 $this->assertSame(
'header_height', $transformer->invokeArgs($this->form, array())->getTitle());
110 $this->assertSame(
'header_height', $transformer->invokeArgs($this->form, array())->getPostVar());
115 $transformer = self::getMethod(
'buildHeaderTextForm');
116 $this->assertInstanceOf(
'ilTextInputGUI', $transformer->invokeArgs($this->form, array()));
117 $this->assertSame(
'head_text', $transformer->invokeArgs($this->form, array())->getTitle());
118 $this->assertSame(
'header_text', $transformer->invokeArgs($this->form, array())->getPostVar());
123 $transformer = self::getMethod(
'buildHeaderPageNumbersForm');
124 $this->assertInstanceOf(
'ilCheckboxInputGUI', $transformer->invokeArgs($this->form, array()));
125 $this->assertSame(
'header_show_pages', $transformer->invokeArgs($this->form, array())->getTitle());
126 $this->assertSame(
'header_show_pages', $transformer->invokeArgs($this->form, array())->getPostVar());
131 $transformer = self::getMethod(
'buildFooterPageNumbersForm');
132 $this->assertInstanceOf(
'ilCheckboxInputGUI', $transformer->invokeArgs($this->form, array()));
133 $this->assertSame(
'footer_show_pages', $transformer->invokeArgs($this->form, array())->getTitle());
134 $this->assertSame(
'footer_show_pages', $transformer->invokeArgs($this->form, array())->getPostVar());
139 $transformer = self::getMethod(
'buildViewPortForm');
140 $this->assertInstanceOf(
'ilTextInputGUI', $transformer->invokeArgs($this->form, array()));
141 $this->assertSame(
'viewport', $transformer->invokeArgs($this->form, array())->getTitle());
142 $this->assertSame(
'viewport', $transformer->invokeArgs($this->form, array())->getPostVar());
147 $transformer = self::getMethod(
'buildPageSizesForm');
148 $this->assertInstanceOf(
'ilSelectInputGUI', $transformer->invokeArgs($this->form, array()));
149 $this->assertSame(
'page_size', $transformer->invokeArgs($this->form, array())->getTitle());
150 $this->assertSame(
'page_size', $transformer->invokeArgs($this->form, array())->getPostVar());
155 $transformer = self::getMethod(
'buildOrientationForm');
156 $this->assertInstanceOf(
'ilSelectInputGUI', $transformer->invokeArgs($this->form, array()));
157 $this->assertSame(
'orientation', $transformer->invokeArgs($this->form, array())->getTitle());
158 $this->assertSame(
'orientation', $transformer->invokeArgs($this->form, array())->getPostVar());
testBuildHeaderPageNumbersForm()
__construct()
ilPhantomJSRenderer constructor.
testBuildFooterPageNumbersForm()
testBuildHeaderTextForm()
testBuildFooterTextForm()
testBuildOrientationForm()
testBuildJavascriptDelayForm()
setGlobalVariable($name, $value)
testBuildFooterHeightForm()
static callMethod($obj, $name, array $args)
testBuildHeaderHeightForm()