]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/LinkDBTest.php
namespacing: \Shaarli\Exceptions\IOException
[github/shaarli/Shaarli.git] / tests / LinkDBTest.php
index fcab76f609b8366a1f2d657fc1aaa76ab0386519..9b2f35e6a678ff6fc97a1d2a2f0157864f6ad096 100644 (file)
@@ -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('://')));
         }