X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FLinkDBTest.php;h=9b2f35e6a678ff6fc97a1d2a2f0157864f6ad096;hb=f3d2f257946e2a3c8791c1ba99b379acbe934fec;hp=fcab76f609b8366a1f2d657fc1aaa76ab0386519;hpb=afe4377e4dbe548d871967a1bfd927115d089495;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php index fcab76f6..9b2f35e6 100644 --- a/tests/LinkDBTest.php +++ b/tests/LinkDBTest.php @@ -3,6 +3,8 @@ * Link datastore tests */ +use Shaarli\Exceptions\IOException; + require_once 'application/Cache.php'; require_once 'application/FileUtils.php'; require_once 'application/LinkDB.php'; @@ -100,7 +102,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase /** * Attempt to instantiate a LinkDB whereas the datastore is not writable * - * @expectedException IOException + * @expectedException Shaarli\Exceptions\IOException * @expectedExceptionMessageRegExp /Error accessing "null"/ */ public function testConstructDatastoreNotWriteable() @@ -362,7 +364,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase public function testLinkRealUrlWithoutRedirector() { $db = new LinkDB(self::$testDatastore, false, false); - foreach($db as $link) { + foreach ($db as $link) { $this->assertEquals($link['url'], $link['real_url']); } } @@ -374,13 +376,13 @@ class LinkDBTest extends PHPUnit_Framework_TestCase { $redirector = 'http://redirector.to?'; $db = new LinkDB(self::$testDatastore, false, false, $redirector); - foreach($db as $link) { + foreach ($db as $link) { $this->assertStringStartsWith($redirector, $link['real_url']); $this->assertNotFalse(strpos($link['real_url'], urlencode('://'))); } $db = new LinkDB(self::$testDatastore, false, false, $redirector, false); - foreach($db as $link) { + foreach ($db as $link) { $this->assertStringStartsWith($redirector, $link['real_url']); $this->assertFalse(strpos($link['real_url'], urlencode('://'))); }