diff options
author | VirtualTam <virtualtam@flibidi.net> | 2015-11-24 02:52:22 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2015-11-26 23:19:37 +0100 |
commit | 4bf35ba56bb9f06de0cb9ab920b799a39f8eaffc (patch) | |
tree | e46d75e5afba96bc0d4edf4cc8af9b54869415b3 /tests/CacheTest.php | |
parent | 61873e3ded8dfba397b39aebd2322d0939c82caa (diff) | |
download | Shaarli-4bf35ba56bb9f06de0cb9ab920b799a39f8eaffc.tar.gz Shaarli-4bf35ba56bb9f06de0cb9ab920b799a39f8eaffc.tar.zst Shaarli-4bf35ba56bb9f06de0cb9ab920b799a39f8eaffc.zip |
application: refactor version checks, move to ApplicationUtils
Relates to #372
Modifications:
- move checkUpdate() to ApplicationUtils
- reduce file I/O operations during version checks
- apply coding conventions
- add test coverage
Tools:
- create a sandbox directory for tests
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/CacheTest.php')
-rw-r--r-- | tests/CacheTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/CacheTest.php b/tests/CacheTest.php index aa5395b0..eacd4487 100644 --- a/tests/CacheTest.php +++ b/tests/CacheTest.php | |||
@@ -11,10 +11,10 @@ require_once 'application/Cache.php'; | |||
11 | /** | 11 | /** |
12 | * Unitary tests for cached pages | 12 | * Unitary tests for cached pages |
13 | */ | 13 | */ |
14 | class CachedTest extends PHPUnit_Framework_TestCase | 14 | class CacheTest extends PHPUnit_Framework_TestCase |
15 | { | 15 | { |
16 | // test cache directory | 16 | // test cache directory |
17 | protected static $testCacheDir = 'tests/dummycache'; | 17 | protected static $testCacheDir = 'sandbox/dummycache'; |
18 | 18 | ||
19 | // dummy cached file names / content | 19 | // dummy cached file names / content |
20 | protected static $pages = array('a', 'toto', 'd7b59c'); | 20 | protected static $pages = array('a', 'toto', 'd7b59c'); |
@@ -56,7 +56,7 @@ class CachedTest extends PHPUnit_Framework_TestCase | |||
56 | public function testPurgeCachedPagesMissingDir() | 56 | public function testPurgeCachedPagesMissingDir() |
57 | { | 57 | { |
58 | $this->assertEquals( | 58 | $this->assertEquals( |
59 | 'Cannot purge tests/dummycache_missing: no directory', | 59 | 'Cannot purge sandbox/dummycache_missing: no directory', |
60 | purgeCachedPages(self::$testCacheDir.'_missing') | 60 | purgeCachedPages(self::$testCacheDir.'_missing') |
61 | ); | 61 | ); |
62 | } | 62 | } |