test: add test for FeedParser (#3754)

This commit is contained in:
Dag 2023-10-13 23:14:08 +02:00 committed by GitHub
parent 5f37c72be0
commit daef240cd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 174 additions and 25 deletions

View file

@ -142,6 +142,7 @@ final class FeedParser
}
if (isset($feedItem->guid)) {
// Pluck out a url from guid
foreach ($feedItem->guid->attributes() as $attribute => $value) {
if (
$attribute === 'isPermaLink'
@ -207,9 +208,9 @@ final class FeedParser
'content' => null,
'timestamp' => null,
'author' => null,
'uid' => null,
'categories' => [],
'enclosures' => [],
//'uid' => null,
//'categories' => [],
//'enclosures' => [],
];
if (isset($feedItem->link)) {
// todo: trim uri