diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-03 12:59:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 12:59:16 +0200 |
commit | 7b18876361f2223672f3a2cac9fc0da16d12d69f (patch) | |
tree | 03a655c46d801d56211fb05cc2930824dace4565 /tests/bookmark/LinkUtilsTest.php | |
parent | ee07b7283faa197fc062ed85f4f96f98e8e77b03 (diff) | |
parent | d246e2c5129fe8d3f8e1429b4e8ff8e3e486c779 (diff) | |
download | Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.tar.gz Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.tar.zst Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.zip |
Merge pull request #1575 from ArthurHoaro/feature/php8
Diffstat (limited to 'tests/bookmark/LinkUtilsTest.php')
-rw-r--r-- | tests/bookmark/LinkUtilsTest.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/bookmark/LinkUtilsTest.php b/tests/bookmark/LinkUtilsTest.php index 0d07897b..ef00b92f 100644 --- a/tests/bookmark/LinkUtilsTest.php +++ b/tests/bookmark/LinkUtilsTest.php | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | namespace Shaarli\Bookmark; | 3 | namespace Shaarli\Bookmark; |
4 | 4 | ||
5 | use PHPUnit\Framework\TestCase; | 5 | use Shaarli\TestCase; |
6 | 6 | ||
7 | require_once 'tests/utils/CurlUtils.php'; | 7 | require_once 'tests/utils/CurlUtils.php'; |
8 | 8 | ||
@@ -450,13 +450,13 @@ class LinkUtilsTest extends TestCase | |||
450 | カタカナ #カタカナ」カタカナ\n'; | 450 | カタカナ #カタカナ」カタカナ\n'; |
451 | $autolinkedDescription = hashtag_autolink($rawDescription, $index); | 451 | $autolinkedDescription = hashtag_autolink($rawDescription, $index); |
452 | 452 | ||
453 | $this->assertContains($this->getHashtagLink('hashtag', $index), $autolinkedDescription); | 453 | $this->assertContainsPolyfill($this->getHashtagLink('hashtag', $index), $autolinkedDescription); |
454 | $this->assertNotContains(' #hashtag', $autolinkedDescription); | 454 | $this->assertNotContainsPolyfill(' #hashtag', $autolinkedDescription); |
455 | $this->assertNotContains('>#nothashtag', $autolinkedDescription); | 455 | $this->assertNotContainsPolyfill('>#nothashtag', $autolinkedDescription); |
456 | $this->assertContains($this->getHashtagLink('ашок', $index), $autolinkedDescription); | 456 | $this->assertContainsPolyfill($this->getHashtagLink('ашок', $index), $autolinkedDescription); |
457 | $this->assertContains($this->getHashtagLink('カタカナ', $index), $autolinkedDescription); | 457 | $this->assertContainsPolyfill($this->getHashtagLink('カタカナ', $index), $autolinkedDescription); |
458 | $this->assertContains($this->getHashtagLink('hashtag_hashtag', $index), $autolinkedDescription); | 458 | $this->assertContainsPolyfill($this->getHashtagLink('hashtag_hashtag', $index), $autolinkedDescription); |
459 | $this->assertNotContains($this->getHashtagLink('hashtag-nothashtag', $index), $autolinkedDescription); | 459 | $this->assertNotContainsPolyfill($this->getHashtagLink('hashtag-nothashtag', $index), $autolinkedDescription); |
460 | } | 460 | } |
461 | 461 | ||
462 | /** | 462 | /** |
@@ -467,9 +467,9 @@ class LinkUtilsTest extends TestCase | |||
467 | $rawDescription = 'blabla #hashtag x#nothashtag'; | 467 | $rawDescription = 'blabla #hashtag x#nothashtag'; |
468 | $autolinkedDescription = hashtag_autolink($rawDescription); | 468 | $autolinkedDescription = hashtag_autolink($rawDescription); |
469 | 469 | ||
470 | $this->assertContains($this->getHashtagLink('hashtag'), $autolinkedDescription); | 470 | $this->assertContainsPolyfill($this->getHashtagLink('hashtag'), $autolinkedDescription); |
471 | $this->assertNotContains(' #hashtag', $autolinkedDescription); | 471 | $this->assertNotContainsPolyfill(' #hashtag', $autolinkedDescription); |
472 | $this->assertNotContains('>#nothashtag', $autolinkedDescription); | 472 | $this->assertNotContainsPolyfill('>#nothashtag', $autolinkedDescription); |
473 | } | 473 | } |
474 | 474 | ||
475 | /** | 475 | /** |