1 | <?php |
||
7 | class OptionsTest extends TestCase |
||
8 | { |
||
9 | public function testIsStylesheetEnabled() |
||
10 | { |
||
11 | $options = new Options(); |
||
12 | |||
13 | $this->assertFalse($options->isStylesheetEnabled()); |
||
14 | $options->setStylesheetEnabled(true); |
||
15 | $this->assertTrue($options->isStylesheetEnabled()); |
||
16 | } |
||
17 | |||
18 | public function testSetStylesheetEnabled() |
||
19 | { |
||
20 | $options = new Options(); |
||
21 | |||
22 | $options->setStylesheetEnabled(false); |
||
23 | $this->assertFalse($options->isStylesheetEnabled()); |
||
24 | |||
25 | $options->setStylesheetEnabled(true); |
||
26 | $this->assertTrue($options->isStylesheetEnabled()); |
||
27 | } |
||
28 | |||
29 | public function testGetStylesheetMode() |
||
30 | { |
||
31 | $options = new Options(); |
||
32 | |||
33 | $this->assertSame('preload', $options->getStylesheetMode()); |
||
34 | $options->setStylesheetMode('prefetch'); |
||
35 | $this->assertSame('prefetch', $options->getStylesheetMode()); |
||
36 | } |
||
37 | |||
38 | public function testSetStylesheetMode() |
||
39 | { |
||
40 | $options = new Options(); |
||
41 | |||
42 | $options->setStylesheetMode('preload'); |
||
43 | $this->assertSame('preload', $options->getStylesheetMode()); |
||
44 | $options->setStylesheetMode('prefetch'); |
||
45 | $this->assertSame('prefetch', $options->getStylesheetMode()); |
||
46 | } |
||
47 | |||
48 | public function testIsScriptEnabled() |
||
49 | { |
||
50 | $options = new Options(); |
||
51 | |||
52 | $this->assertFalse($options->isScriptEnabled()); |
||
53 | $options->setScriptEnabled(true); |
||
54 | $this->assertTrue($options->isScriptEnabled()); |
||
55 | } |
||
56 | |||
57 | public function testSetScriptEnabled() |
||
58 | { |
||
59 | $options = new Options(); |
||
60 | |||
61 | $options->setScriptEnabled(false); |
||
62 | $this->assertFalse($options->isScriptEnabled()); |
||
63 | |||
64 | $options->setScriptEnabled(true); |
||
65 | $this->assertTrue($options->isScriptEnabled()); |
||
66 | } |
||
67 | |||
68 | public function testGetScriptMode() |
||
69 | { |
||
70 | $options = new Options(); |
||
71 | |||
72 | $this->assertSame('preload', $options->getScriptMode()); |
||
73 | $options->setScriptMode('prefetch'); |
||
74 | $this->assertSame('prefetch', $options->getScriptMode()); |
||
75 | } |
||
76 | |||
77 | public function testSetScriptMode() |
||
78 | { |
||
79 | $options = new Options(); |
||
80 | |||
81 | $options->setScriptMode('preload'); |
||
82 | $this->assertSame('preload', $options->getScriptMode()); |
||
83 | $options->setScriptMode('prefetch'); |
||
84 | $this->assertSame('prefetch', $options->getScriptMode()); |
||
85 | } |
||
86 | |||
87 | public function testIsHttp2PushDisabled() |
||
88 | { |
||
89 | $options = new Options(); |
||
90 | |||
91 | $this->assertFalse($options->isHttp2PushEnabled()); |
||
92 | $options->setHttp2PushEnabled(true); |
||
93 | $this->assertTrue($options->isHttp2PushEnabled()); |
||
94 | } |
||
95 | |||
96 | public function testSetHttp2PushDisabled() |
||
97 | { |
||
98 | $options = new Options(); |
||
99 | |||
100 | $options->setHttp2PushEnabled(false); |
||
101 | $this->assertFalse($options->isHttp2PushEnabled()); |
||
102 | |||
103 | $options->setHttp2PushEnabled(true); |
||
104 | $this->assertTrue($options->isHttp2PushEnabled()); |
||
105 | } |
||
106 | } |
||
107 |