aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/bookmark/LinkUtilsTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2019-03-02 10:54:06 +0100
committerGitHub <noreply@github.com>2019-03-02 10:54:06 +0100
commitcc69aad4a903dc603f47cfa87aeb1865b03c8950 (patch)
treeffc04dac709b2a4cc732ce10f98fb40a562863c7 /tests/bookmark/LinkUtilsTest.php
parent5bb384cd2742ff4f982cbe914cee551b74ab4bad (diff)
parenta8e7da01146455f13ef06b151a7dafedd3acf769 (diff)
downloadShaarli-cc69aad4a903dc603f47cfa87aeb1865b03c8950.tar.gz
Shaarli-cc69aad4a903dc603f47cfa87aeb1865b03c8950.tar.zst
Shaarli-cc69aad4a903dc603f47cfa87aeb1865b03c8950.zip
Merge pull request #1271 from ArthurHoaro/hotfix/thumb-note-retrieve
Do not try to retrieve thumbnails for internal link
Diffstat (limited to 'tests/bookmark/LinkUtilsTest.php')
-rw-r--r--tests/bookmark/LinkUtilsTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bookmark/LinkUtilsTest.php b/tests/bookmark/LinkUtilsTest.php
index bd08f036..25fb3043 100644
--- a/tests/bookmark/LinkUtilsTest.php
+++ b/tests/bookmark/LinkUtilsTest.php
@@ -289,6 +289,26 @@ class LinkUtilsTest extends \PHPUnit\Framework\TestCase
289 } 289 }
290 290
291 /** 291 /**
292 * Test is_note with note URLs.
293 */
294 public function testIsNote()
295 {
296 $this->assertTrue(is_note('?'));
297 $this->assertTrue(is_note('?abcDEf'));
298 $this->assertTrue(is_note('?_abcDEf#123'));
299 }
300
301 /**
302 * Test is_note with non note URLs.
303 */
304 public function testIsNotNote()
305 {
306 $this->assertFalse(is_note(''));
307 $this->assertFalse(is_note('nope'));
308 $this->assertFalse(is_note('https://github.com/shaarli/Shaarli/?hi'));
309 }
310
311 /**
292 * Util function to build an hashtag link. 312 * Util function to build an hashtag link.
293 * 313 *
294 * @param string $hashtag Hashtag name. 314 * @param string $hashtag Hashtag name.