test: add feed item test (#3709)

* test: add feed item test

also some refactor

* yup

* yup
This commit is contained in:
Dag 2023-09-25 22:32:15 +02:00 committed by GitHub
parent cd30c25b08
commit f421c45b21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 98 additions and 81 deletions

View file

@ -15,6 +15,7 @@ function getContents(
bool $returnFull = false
) {
$httpClient = RssBridge::getHttpClient();
$cache = RssBridge::getCache();
$httpHeadersNormalized = [];
foreach ($httpHeaders as $httpHeader) {
@ -51,7 +52,6 @@ function getContents(
$config['proxy'] = Configuration::getConfig('proxy', 'url');
}
$cache = RssBridge::getCache();
$cacheKey = 'server_' . $url;
/** @var Response $cachedResponse */

View file

@ -148,7 +148,7 @@ final class StreamHandler
$context
);
error_log($text);
if (Debug::isEnabled()) {
if ($record['level'] < Logger::ERROR && Debug::isEnabled()) {
print sprintf("<pre>%s</pre>\n", e($text));
}
//$bytes = file_put_contents('/tmp/rss-bridge.log', $text, FILE_APPEND | LOCK_EX);