diff options
author | VirtualTam <virtualtam@flibidi.net> | 2015-11-24 01:36:12 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2015-11-24 01:40:44 +0100 |
commit | c9cf2715f0ec10d51d881d386de9fa818f76af46 (patch) | |
tree | 013c6f7c590ed936ca7d3244e1ed89c470500df4 /tests/ApplicationUtilsTest.php | |
parent | 0def004963c62ff1edfce16272a87ba9f0c87e16 (diff) | |
download | Shaarli-c9cf2715f0ec10d51d881d386de9fa818f76af46.tar.gz Shaarli-c9cf2715f0ec10d51d881d386de9fa818f76af46.tar.zst Shaarli-c9cf2715f0ec10d51d881d386de9fa818f76af46.zip |
application: move checkPHPVersion from Utils to ApplicationUtils
Relates to #372
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/ApplicationUtilsTest.php')
-rw-r--r-- | tests/ApplicationUtilsTest.php | 31 |
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'; | |||
12 | class ApplicationUtilsTest extends PHPUnit_Framework_TestCase | 12 | class 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() |