Merge pull request from ArthurHoaro/hotfix/thumb-note-retrieve

Do not try to retrieve thumbnails for internal link
This commit is contained in:
ArthurHoaro 2019-03-02 10:54:06 +01:00 committed by GitHub
commit cc69aad4a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 42 additions and 7 deletions
tests/bookmark

View file

@ -288,6 +288,26 @@ class LinkUtilsTest extends \PHPUnit\Framework\TestCase
$this->assertNotContains('>#nothashtag', $autolinkedDescription);
}
/**
* Test is_note with note URLs.
*/
public function testIsNote()
{
$this->assertTrue(is_note('?'));
$this->assertTrue(is_note('?abcDEf'));
$this->assertTrue(is_note('?_abcDEf#123'));
}
/**
* Test is_note with non note URLs.
*/
public function testIsNotNote()
{
$this->assertFalse(is_note(''));
$this->assertFalse(is_note('nope'));
$this->assertFalse(is_note('https://github.com/shaarli/Shaarli/?hi'));
}
/**
* Util function to build an hashtag link.
*