aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ApplicationUtilsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ApplicationUtilsTest.php')
-rw-r--r--tests/ApplicationUtilsTest.php31
1 files changed, 31 insertions, 0 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()