aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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.