From 4bf35ba56bb9f06de0cb9ab920b799a39f8eaffc Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Tue, 24 Nov 2015 02:52:22 +0100 Subject: 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 --- tests/CacheTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/CacheTest.php') 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'; /** * Unitary tests for cached pages */ -class CachedTest extends PHPUnit_Framework_TestCase +class CacheTest extends PHPUnit_Framework_TestCase { // test cache directory - protected static $testCacheDir = 'tests/dummycache'; + protected static $testCacheDir = 'sandbox/dummycache'; // dummy cached file names / content protected static $pages = array('a', 'toto', 'd7b59c'); @@ -56,7 +56,7 @@ class CachedTest extends PHPUnit_Framework_TestCase public function testPurgeCachedPagesMissingDir() { $this->assertEquals( - 'Cannot purge tests/dummycache_missing: no directory', + 'Cannot purge sandbox/dummycache_missing: no directory', purgeCachedPages(self::$testCacheDir.'_missing') ); } -- cgit v1.2.3