aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/bookmark/BookmarkFileServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bookmark/BookmarkFileServiceTest.php')
-rw-r--r--tests/bookmark/BookmarkFileServiceTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/bookmark/BookmarkFileServiceTest.php b/tests/bookmark/BookmarkFileServiceTest.php
index 5adc26aa..b19c8250 100644
--- a/tests/bookmark/BookmarkFileServiceTest.php
+++ b/tests/bookmark/BookmarkFileServiceTest.php
@@ -892,35 +892,35 @@ class BookmarkFileServiceTest extends TestCase
892 public function testFilterHashValid() 892 public function testFilterHashValid()
893 { 893 {
894 $request = smallHash('20150310_114651'); 894 $request = smallHash('20150310_114651');
895 $this->assertEquals( 895 $this->assertSame(
896 1, 896 $request,
897 count($this->publicLinkDB->findByHash($request)) 897 $this->publicLinkDB->findByHash($request)->getShortUrl()
898 ); 898 );
899 $request = smallHash('20150310_114633' . 8); 899 $request = smallHash('20150310_114633' . 8);
900 $this->assertEquals( 900 $this->assertSame(
901 1, 901 $request,
902 count($this->publicLinkDB->findByHash($request)) 902 $this->publicLinkDB->findByHash($request)->getShortUrl()
903 ); 903 );
904 } 904 }
905 905
906 /** 906 /**
907 * Test filterHash() with an invalid smallhash. 907 * Test filterHash() with an invalid smallhash.
908 *
909 * @expectedException \Shaarli\Bookmark\Exception\BookmarkNotFoundException
910 */ 908 */
911 public function testFilterHashInValid1() 909 public function testFilterHashInValid1()
912 { 910 {
911 $this->expectException(BookmarkNotFoundException::class);
912
913 $request = 'blabla'; 913 $request = 'blabla';
914 $this->publicLinkDB->findByHash($request); 914 $this->publicLinkDB->findByHash($request);
915 } 915 }
916 916
917 /** 917 /**
918 * Test filterHash() with an empty smallhash. 918 * Test filterHash() with an empty smallhash.
919 *
920 * @expectedException \Shaarli\Bookmark\Exception\BookmarkNotFoundException
921 */ 919 */
922 public function testFilterHashInValid() 920 public function testFilterHashInValid()
923 { 921 {
922 $this->expectException(BookmarkNotFoundException::class);
923
924 $this->publicLinkDB->findByHash(''); 924 $this->publicLinkDB->findByHash('');
925 } 925 }
926 926