* Attempt to instantiate a LinkDB whereas the datastore is not writable
*
* @expectedException IOException
* Attempt to instantiate a LinkDB whereas the datastore is not writable
*
* @expectedException IOException
$checkDB->invokeArgs($linkDB, array());
$this->assertFileExists(self::$testDatastore);
$checkDB->invokeArgs($linkDB, array());
$this->assertFileExists(self::$testDatastore);
$datastoreSize = filesize(self::$testDatastore);
$this->assertGreaterThan(0, $datastoreSize);
$datastoreSize = filesize(self::$testDatastore);
$this->assertGreaterThan(0, $datastoreSize);
$checkDB->invokeArgs($linkDB, array());
// ensure the datastore is left unmodified
$checkDB->invokeArgs($linkDB, array());
// ensure the datastore is left unmodified
{
$testDB = new LinkDB(self::$testDatastore, true, false);
$dbSize = sizeof($testDB);
{
$testDB = new LinkDB(self::$testDatastore, true, false);
$dbSize = sizeof($testDB);
$testDB = new LinkDB(self::$testDatastore, true, false);
$this->assertEquals($dbSize + 1, sizeof($testDB));
$testDB = new LinkDB(self::$testDatastore, true, false);
$this->assertEquals($dbSize + 1, sizeof($testDB));
$link = self::$publicLinkDB->getLinkFromUrl('http://mediagoblin.org/');
$this->assertNotEquals(false, $link);
$link = self::$publicLinkDB->getLinkFromUrl('http://mediagoblin.org/');
$this->assertNotEquals(false, $link);