]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/LinkDBTest.php
install: check file/directory permissions for Shaarli resources
[github/shaarli/Shaarli.git] / tests / LinkDBTest.php
index 504c81901a8fc402278e66eb50689d51e5fe0b92..8929713d26341941ffce05785d09fe5fb2cced39 100644 (file)
@@ -3,6 +3,8 @@
  * Link datastore tests
  */
 
+require_once 'application/Cache.php';
+require_once 'application/FileUtils.php';
 require_once 'application/LinkDB.php';
 require_once 'application/Utils.php';
 require_once 'tests/utils/ReferenceLinkDB.php';
@@ -86,8 +88,8 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
     /**
      * Attempt to instantiate a LinkDB whereas the datastore is not writable
      *
-     * @expectedException              PHPUnit_Framework_Error_Warning
-     * @expectedExceptionMessageRegExp /failed to open stream: No such file or directory/
+     * @expectedException              IOException
+     * @expectedExceptionMessageRegExp /Error accessing null/
      */
     public function testConstructDatastoreNotWriteable()
     {
@@ -180,11 +182,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
             'tags'=>'unit test'
         );
         $testDB[$link['linkdate']] = $link;
-
-        // TODO: move PageCache to a proper class/file
-        function invalidateCaches() {}
-
-        $testDB->savedb();
+        $testDB->savedb('tests');
 
         $testDB = new LinkDB(self::$testDatastore, true, false);
         $this->assertEquals($dbSize + 1, sizeof($testDB));
@@ -514,4 +512,3 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
         );
     }
 }
-?>