mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-01 14:20:16 +02:00
test: add feed item test (#3709)
* test: add feed item test also some refactor * yup * yup
This commit is contained in:
@@ -6,18 +6,14 @@ class PlaintextFormat extends FormatAbstract
|
||||
|
||||
public function stringify()
|
||||
{
|
||||
$items = $this->getItems();
|
||||
$data = [];
|
||||
|
||||
foreach ($items as $item) {
|
||||
foreach ($this->getItems() as $item) {
|
||||
$data[] = $item->toArray();
|
||||
}
|
||||
|
||||
$toReturn = print_r($data, true);
|
||||
|
||||
$text = print_r($data, true);
|
||||
// Remove invalid non-UTF8 characters
|
||||
ini_set('mbstring.substitute_character', 'none');
|
||||
$toReturn = mb_convert_encoding($toReturn, $this->getCharset(), 'UTF-8');
|
||||
return $toReturn;
|
||||
$text = mb_convert_encoding($text, $this->getCharset(), 'UTF-8');
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user