Skip to content

Commit 12aacf2

Browse files
authored
Merge pull request #386 from paulhennell/detectDatePublished
datePublished failing test
2 parents 2b9d29e + d205f23 commit 12aacf2

File tree

4 files changed

+2423
-0
lines changed

4 files changed

+2423
-0
lines changed

src/Detectors/PublishedTime.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function detect(): ?Datetime
2424
'newsrepublic:publish_date'
2525
)
2626
?: $ld->time('pagePublished')
27+
?: $ld->time('datePublished')
2728
?: $this->detectFromPath()
2829
?: $metas->time(
2930
'pagerender',

tests/PagesTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,9 @@ public function testYoutube()
184184
$this->assertEmbed('https://www.youtube.com/playlist?list=PL4qTakKkQATKOyZPJG_cAMnRtF7fAIdST');
185185
$this->assertEmbed('https://www.youtube.com/channel/UCuZeHD5SGecQomz2pVDHGzg');
186186
}
187+
188+
public function testBBCNews()
189+
{
190+
$this->assertEmbed('https://www.bbc.co.uk/news/uk-54222286');
191+
}
187192
}

0 commit comments

Comments
 (0)