namespace Shaarli\Netscape;
-use PHPUnit\Framework\TestCase;
use Shaarli\Bookmark\BookmarkFileService;
use Shaarli\Config\ConfigManager;
use Shaarli\Formatter\BookmarkFormatter;
use Shaarli\Formatter\FormatterFactory;
use Shaarli\History;
+use Shaarli\TestCase;
require_once 'tests/utils/ReferenceLinkDB.php';
/**
* Instantiate reference data
*/
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
static::$conf = new ConfigManager('tests/utils/config/configJson');
static::$conf->set('resource.datastore', static::$testDatastore);
/**
* Attempt to export an invalid link selection
- * @expectedException Exception
- * @expectedExceptionMessageRegExp /Invalid export selection/
*/
public function testFilterAndFormatInvalid()
{
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessageRegExp('/Invalid export selection/');
+
$this->netscapeBookmarkUtils->filterAndFormat(
self::$formatter,
'derp',
''
);
$this->assertEquals(
- '?WDWyig',
+ '/shaare/WDWyig',
$links[2]['url']
);
}
$indexUrl
);
$this->assertEquals(
- $indexUrl . '?WDWyig',
+ $indexUrl . 'shaare/WDWyig',
$links[2]['url']
);
}