1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

test: Add test for http_status filter

This commit is contained in:
Kevin Jiang 2024-07-21 16:25:41 +12:00
parent c42a4a308f
commit fc14f86ae4
4 changed files with 73 additions and 13 deletions

View file

@ -87,6 +87,17 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface
'tags' => ['bar-tag'],
'is_not_parsed' => true,
],
'entry7' => [
'user' => 'admin-user',
'url' => 'http://0.0.0.0/entry7',
'reading_time' => 12,
'domain' => 'redirect.io',
'mime' => 'text/html',
'title' => 'test title entry7',
'http_status' => '302',
'content' => 'This is redirect/o/',
'language' => 'de',
],
];
foreach ($entries as $reference => $item) {
@ -133,6 +144,10 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface
$entry->setNotParsed($item['is_not_parsed']);
}
if (isset($item['http_status'])) {
$entry->setHttpStatus($item['http_status']);
}
$manager->persist($entry);
$this->addReference($reference, $entry);
}