aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/UtilsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/UtilsTest.php')
-rw-r--r--tests/UtilsTest.php34
1 files changed, 33 insertions, 1 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php
index 8355c7f8..28e15f5a 100644
--- a/tests/UtilsTest.php
+++ b/tests/UtilsTest.php
@@ -109,7 +109,7 @@ class UtilsTest extends PHPUnit_Framework_TestCase
109 */ 109 */
110 public function testGenerateLocationLoop() { 110 public function testGenerateLocationLoop() {
111 $ref = 'http://localhost/?test'; 111 $ref = 'http://localhost/?test';
112 $this->assertEquals('?', generateLocation($ref, 'localhost', ['test'])); 112 $this->assertEquals('?', generateLocation($ref, 'localhost', array('test')));
113 } 113 }
114 114
115 /** 115 /**
@@ -119,4 +119,36 @@ class UtilsTest extends PHPUnit_Framework_TestCase
119 $ref = 'http://somewebsite.com/?test'; 119 $ref = 'http://somewebsite.com/?test';
120 $this->assertEquals('?', generateLocation($ref, 'localhost')); 120 $this->assertEquals('?', generateLocation($ref, 'localhost'));
121 } 121 }
122
123 /**
124 * Check supported PHP versions
125 */
126 public function testCheckSupportedPHPVersion()
127 {
128 $minVersion = '5.3';
129 checkPHPVersion($minVersion, '5.4.32');
130 checkPHPVersion($minVersion, '5.5');
131 checkPHPVersion($minVersion, '5.6.10');
132 }
133
134 /**
135 * Check a unsupported PHP version
136 * @expectedException Exception
137 * @expectedExceptionMessageRegExp /Your PHP version is obsolete/
138 */
139 public function testCheckSupportedPHPVersion51()
140 {
141 checkPHPVersion('5.3', '5.1.0');
142 }
143
144 /**
145 * Check another unsupported PHP version
146 * @expectedException Exception
147 * @expectedExceptionMessageRegExp /Your PHP version is obsolete/
148 */
149 public function testCheckSupportedPHPVersion52()
150 {
151 checkPHPVersion('5.3', '5.2');
152 }
122} 153}
154?>