aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/LinkDBTest.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2015-07-09 22:14:39 +0200
committerVirtualTam <virtualtam@flibidi.net>2015-08-13 23:48:06 +0200
commit01e48f269df59e02798dad4a698c125d76b0ed70 (patch)
tree9341487badd4ed14e0104ae338cf48c4ee0dc994 /tests/LinkDBTest.php
parent5ac5349ac053b1e560b136c62f8c764fd3230039 (diff)
downloadShaarli-01e48f269df59e02798dad4a698c125d76b0ed70.tar.gz
Shaarli-01e48f269df59e02798dad4a698c125d76b0ed70.tar.zst
Shaarli-01e48f269df59e02798dad4a698c125d76b0ed70.zip
CachedPage: move to a proper file, add tests
Modifications - rename `pageCache` to `CachedPage` - move utilities to `Cache` - do not access globals - apply coding rules - update LinkDB and test code - add test coverage Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/LinkDBTest.php')
-rw-r--r--tests/LinkDBTest.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php
index 504c8190..451f1d6f 100644
--- a/tests/LinkDBTest.php
+++ b/tests/LinkDBTest.php
@@ -3,6 +3,7 @@
3 * Link datastore tests 3 * Link datastore tests
4 */ 4 */
5 5
6require_once 'application/Cache.php';
6require_once 'application/LinkDB.php'; 7require_once 'application/LinkDB.php';
7require_once 'application/Utils.php'; 8require_once 'application/Utils.php';
8require_once 'tests/utils/ReferenceLinkDB.php'; 9require_once 'tests/utils/ReferenceLinkDB.php';
@@ -180,11 +181,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
180 'tags'=>'unit test' 181 'tags'=>'unit test'
181 ); 182 );
182 $testDB[$link['linkdate']] = $link; 183 $testDB[$link['linkdate']] = $link;
183 184 $testDB->savedb('tests');
184 // TODO: move PageCache to a proper class/file
185 function invalidateCaches() {}
186
187 $testDB->savedb();
188 185
189 $testDB = new LinkDB(self::$testDatastore, true, false); 186 $testDB = new LinkDB(self::$testDatastore, true, false);
190 $this->assertEquals($dbSize + 1, sizeof($testDB)); 187 $this->assertEquals($dbSize + 1, sizeof($testDB));
@@ -514,4 +511,3 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
514 ); 511 );
515 } 512 }
516} 513}
517?>