]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/bookmark/BookmarkFileServiceTest.php
Raise 404 error instead of 500 if permalink access is denied
[github/shaarli/Shaarli.git] / tests / bookmark / BookmarkFileServiceTest.php
index 8e0ff8dd0281f0021e728133d12a039c34478f0e..f619aff3f7865d7aebddcd4fb06622b52521b2e0 100644 (file)
@@ -886,8 +886,8 @@ class BookmarkFileServiceTest extends TestCase
      */
     public function testFilterHashPrivateWhileLoggedOut()
     {
-        $this->expectException(\Exception::class);
-        $this->expectExceptionMessage('Not authorized');
+        $this->expectException(BookmarkNotFoundException::class);
+        $this->expectExceptionMessage('The link you are trying to reach does not exist or has been deleted');
 
         $hash = smallHash('20141125_084734' . 6);