aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ApplicationUtilsTest.php31
-rw-r--r--tests/UtilsTest.php31
2 files changed, 31 insertions, 31 deletions
diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php
index 9a99c6c6..01301e68 100644
--- a/tests/ApplicationUtilsTest.php
+++ b/tests/ApplicationUtilsTest.php
@@ -12,6 +12,37 @@ require_once 'application/ApplicationUtils.php';
12class ApplicationUtilsTest extends PHPUnit_Framework_TestCase 12class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
13{ 13{
14 /** 14 /**
15 * Check supported PHP versions
16 */
17 public function testCheckSupportedPHPVersion()
18 {
19 $minVersion = '5.3';
20 ApplicationUtils::checkPHPVersion($minVersion, '5.4.32');
21 ApplicationUtils::checkPHPVersion($minVersion, '5.5');
22 ApplicationUtils::checkPHPVersion($minVersion, '5.6.10');
23 }
24
25 /**
26 * Check a unsupported PHP version
27 * @expectedException Exception
28 * @expectedExceptionMessageRegExp /Your PHP version is obsolete/
29 */
30 public function testCheckSupportedPHPVersion51()
31 {
32 ApplicationUtils::checkPHPVersion('5.3', '5.1.0');
33 }
34
35 /**
36 * Check another unsupported PHP version
37 * @expectedException Exception
38 * @expectedExceptionMessageRegExp /Your PHP version is obsolete/
39 */
40 public function testCheckSupportedPHPVersion52()
41 {
42 ApplicationUtils::checkPHPVersion('5.3', '5.2');
43 }
44
45 /**
15 * Checks resource permissions for the current Shaarli installation 46 * Checks resource permissions for the current Shaarli installation
16 */ 47 */
17 public function testCheckCurrentResourcePermissions() 48 public function testCheckCurrentResourcePermissions()
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php
index 311d4bfb..4847ea94 100644
--- a/tests/UtilsTest.php
+++ b/tests/UtilsTest.php
@@ -139,37 +139,6 @@ class UtilsTest extends PHPUnit_Framework_TestCase
139 } 139 }
140 140
141 /** 141 /**
142 * Check supported PHP versions
143 */
144 public function testCheckSupportedPHPVersion()
145 {
146 $minVersion = '5.3';
147 checkPHPVersion($minVersion, '5.4.32');
148 checkPHPVersion($minVersion, '5.5');
149 checkPHPVersion($minVersion, '5.6.10');
150 }
151
152 /**
153 * Check a unsupported PHP version
154 * @expectedException Exception
155 * @expectedExceptionMessageRegExp /Your PHP version is obsolete/
156 */
157 public function testCheckSupportedPHPVersion51()
158 {
159 checkPHPVersion('5.3', '5.1.0');
160 }
161
162 /**
163 * Check another unsupported PHP version
164 * @expectedException Exception
165 * @expectedExceptionMessageRegExp /Your PHP version is obsolete/
166 */
167 public function testCheckSupportedPHPVersion52()
168 {
169 checkPHPVersion('5.3', '5.2');
170 }
171
172 /**
173 * Test is_session_id_valid with a valid ID - TEST ALL THE HASHES! 142 * Test is_session_id_valid with a valid ID - TEST ALL THE HASHES!
174 * 143 *
175 * This tests extensively covers all hash algorithms / bit representations 144 * This tests extensively covers all hash algorithms / bit representations