diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 12:07:13 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 12:07:13 +0200 |
commit | d9f6275ebca035fec8331652c677981056793ccc (patch) | |
tree | 37a64baf4f0eba6b781040605965383d8aded2cc /tests/utils/FakeApplicationUtils.php | |
parent | 38672ba0d1c722e5d6d33a58255ceb55e9410e46 (diff) | |
parent | d63ff87a009313141ae684ec447b902562ff6ee7 (diff) | |
download | Shaarli-d9f6275ebca035fec8331652c677981056793ccc.tar.gz Shaarli-d9f6275ebca035fec8331652c677981056793ccc.tar.zst Shaarli-d9f6275ebca035fec8331652c677981056793ccc.zip |
Merge branch 'v0.11' into stablestable
Diffstat (limited to 'tests/utils/FakeApplicationUtils.php')
-rw-r--r-- | tests/utils/FakeApplicationUtils.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/utils/FakeApplicationUtils.php b/tests/utils/FakeApplicationUtils.php new file mode 100644 index 00000000..de83d598 --- /dev/null +++ b/tests/utils/FakeApplicationUtils.php | |||
@@ -0,0 +1,19 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Shaarli; | ||
4 | |||
5 | /** | ||
6 | * Fake ApplicationUtils class to avoid HTTP requests | ||
7 | */ | ||
8 | class FakeApplicationUtils extends ApplicationUtils | ||
9 | { | ||
10 | public static $VERSION_CODE = ''; | ||
11 | |||
12 | /** | ||
13 | * Toggle HTTP requests, allow overriding the version code | ||
14 | */ | ||
15 | public static function getVersion($url, $timeout = 0) | ||
16 | { | ||
17 | return self::$VERSION_CODE; | ||
18 | } | ||
19 | } | ||