diff options
author | VirtualTam <virtualtam@flibidi.net> | 2018-12-03 23:58:59 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2019-01-12 23:11:19 +0100 |
commit | 9778a1551ce708b9f421a181806412a05410f1fb (patch) | |
tree | 325e12edc2b80b99b10e07be63351d786113aee9 /tests/ApplicationUtilsTest.php | |
parent | bcf056c9d92e5240e645c76a4cdc8ae159693f9a (diff) | |
download | Shaarli-9778a1551ce708b9f421a181806412a05410f1fb.tar.gz Shaarli-9778a1551ce708b9f421a181806412a05410f1fb.tar.zst Shaarli-9778a1551ce708b9f421a181806412a05410f1fb.zip |
namespacing: \Shaarli\ApplicationUtils
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/ApplicationUtilsTest.php')
-rw-r--r-- | tests/ApplicationUtilsTest.php | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php index fe5f84ce..82f8804d 100644 --- a/tests/ApplicationUtilsTest.php +++ b/tests/ApplicationUtilsTest.php | |||
@@ -1,33 +1,14 @@ | |||
1 | <?php | 1 | <?php |
2 | use Shaarli\Config\ConfigManager; | 2 | namespace Shaarli; |
3 | |||
4 | /** | ||
5 | * ApplicationUtils' tests | ||
6 | */ | ||
7 | 3 | ||
8 | require_once 'application/ApplicationUtils.php'; | 4 | use Shaarli\Config\ConfigManager; |
9 | |||
10 | /** | ||
11 | * Fake ApplicationUtils class to avoid HTTP requests | ||
12 | */ | ||
13 | class FakeApplicationUtils extends ApplicationUtils | ||
14 | { | ||
15 | public static $VERSION_CODE = ''; | ||
16 | |||
17 | /** | ||
18 | * Toggle HTTP requests, allow overriding the version code | ||
19 | */ | ||
20 | public static function getVersion($url, $timeout = 0) | ||
21 | { | ||
22 | return self::$VERSION_CODE; | ||
23 | } | ||
24 | } | ||
25 | 5 | ||
6 | require_once 'tests/utils/FakeApplicationUtils.php'; | ||
26 | 7 | ||
27 | /** | 8 | /** |
28 | * Unitary tests for Shaarli utilities | 9 | * Unitary tests for Shaarli utilities |
29 | */ | 10 | */ |
30 | class ApplicationUtilsTest extends PHPUnit_Framework_TestCase | 11 | class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase |
31 | { | 12 | { |
32 | protected static $testUpdateFile = 'sandbox/update.txt'; | 13 | protected static $testUpdateFile = 'sandbox/update.txt'; |
33 | protected static $testVersion = '0.5.0'; | 14 | protected static $testVersion = '0.5.0'; |