X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FLinkFilterTest.php;h=9cd6dbd443b2a52b492cd165d12155c06aa14f49;hb=7c57bd95383ec7a7d40735957ea9a792c370b5db;hp=d796d3a301c469652bbb8bcc6295db0e539417cb;hpb=f09e1e318e0b1c72aa659c20b715be508009175f;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/LinkFilterTest.php b/tests/LinkFilterTest.php index d796d3a3..9cd6dbd4 100644 --- a/tests/LinkFilterTest.php +++ b/tests/LinkFilterTest.php @@ -7,6 +7,10 @@ require_once 'application/LinkFilter.php'; */ class LinkFilterTest extends PHPUnit_Framework_TestCase { + /** + * @var string Test datastore path. + */ + protected static $testDatastore = 'sandbox/datastore.php'; /** * @var LinkFilter instance. */ @@ -17,13 +21,20 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase */ protected static $refDB; + /** + * @var LinkDB instance + */ + protected static $linkDB; + /** * Instanciate linkFilter with ReferenceLinkDB data. */ public static function setUpBeforeClass() { self::$refDB = new ReferenceLinkDB(); - self::$linkFilter = new LinkFilter(self::$refDB->getLinks()); + self::$refDB->write(self::$testDatastore); + self::$linkDB = new LinkDB(self::$testDatastore, true, false); + self::$linkFilter = new LinkFilter(self::$linkDB); } /**