diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-07-06 08:04:35 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 1a8ac737e52cb25a5c346232ee398f5908cee7d7 (patch) | |
tree | 31954c4e106b5743e2005d72c2d548a0be8d6dce /tests/bookmark | |
parent | 6132d64748dfc6806ed25f71d2e078a5ed29d071 (diff) | |
download | Shaarli-1a8ac737e52cb25a5c346232ee398f5908cee7d7.tar.gz Shaarli-1a8ac737e52cb25a5c346232ee398f5908cee7d7.tar.zst Shaarli-1a8ac737e52cb25a5c346232ee398f5908cee7d7.zip |
Process main page (linklist) through Slim controller
Including a bunch of improvements on the container,
and helper used across new controllers.
Diffstat (limited to 'tests/bookmark')
-rw-r--r-- | tests/bookmark/BookmarkFileServiceTest.php | 20 |
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 | ||