diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-12-29 11:43:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 11:43:39 +0100 |
commit | 8ed5fbef8f2a5e666f80be0c38930b92672d351a (patch) | |
tree | 3198b3e164ba8ffaa8e1e947e5fa169be61674ea /tests | |
parent | b01b3b83a71044db833b21203dc510f9c45ad6fc (diff) | |
parent | 88a8e284b2825cbd77c75dbbbf3655a961d9eb09 (diff) | |
download | Shaarli-8ed5fbef8f2a5e666f80be0c38930b92672d351a.tar.gz Shaarli-8ed5fbef8f2a5e666f80be0c38930b92672d351a.tar.zst Shaarli-8ed5fbef8f2a5e666f80be0c38930b92672d351a.zip |
Merge pull request #1665 from ArthurHoaro/fix/metadata-regexes-2
Fix metadata extract regex (2)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bookmark/LinkUtilsTest.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/bookmark/LinkUtilsTest.php b/tests/bookmark/LinkUtilsTest.php index ddab4e3c..46a7f1fe 100644 --- a/tests/bookmark/LinkUtilsTest.php +++ b/tests/bookmark/LinkUtilsTest.php | |||
@@ -245,6 +245,16 @@ class LinkUtilsTest extends TestCase | |||
245 | $this->assertFalse(html_extract_tag('description', $html)); | 245 | $this->assertFalse(html_extract_tag('description', $html)); |
246 | } | 246 | } |
247 | 247 | ||
248 | public function testHtmlExtractDescriptionFromGoogleRealCase(): void | ||
249 | { | ||
250 | $html = 'id="gsr"><meta content="Fêtes de fin d\'année" property="twitter:title"><meta '. | ||
251 | 'content="Bonnes fêtes de fin d\'année ! #GoogleDoodle" property="twitter:description">'. | ||
252 | '<meta content="Bonnes fêtes de fin d\'année ! #GoogleDoodle" property="og:description">'. | ||
253 | '<meta content="summary_large_image" property="twitter:card"><meta co' | ||
254 | ; | ||
255 | $this->assertSame('Bonnes fêtes de fin d\'année ! #GoogleDoodle', html_extract_tag('description', $html)); | ||
256 | } | ||
257 | |||
248 | /** | 258 | /** |
249 | * Test the header callback with valid value | 259 | * Test the header callback with valid value |
250 | */ | 260 | */ |