*/
private static $configFields;
+ /**
+ * @var string Path to test datastore.
+ */
+ protected static $testDatastore = 'sandbox/datastore.php';
+
/**
* Executed before each test.
*/
'config' => array(
'CONFIG_FILE' => 'tests/Updater/config.php',
'DATADIR' => 'tests/Updater',
+ 'PAGECACHE' => 'sandbox/pagecache',
'config1' => 'config1data',
'config2' => 'config2data',
)
include self::$configFields['config']['CONFIG_FILE'];
$this->assertEquals(self::$configFields['login'], $GLOBALS['login']);
}
+
+ public function testRenameDashTags()
+ {
+ $refDB = new ReferenceLinkDB();
+ $refDB->write(self::$testDatastore);
+ $linkDB = new LinkDB(self::$testDatastore, true, false);
+ $this->assertEmpty($linkDB->filter(LinkFilter::$FILTER_TAG, 'exclude'));
+ $updater = new Updater(array(), self::$configFields, $linkDB, true);
+ $updater->updateMethodRenameDashTags();
+ $this->assertNotEmpty($linkDB->filter(LinkFilter::$FILTER_TAG, 'exclude'));
+ }
}