saved)) { unlink($this->saved); } } public function testOriginalReader(): void { $rss = SRSS::read($this->original); self::assertEquals('Liftoff News', $rss->title); $article1 = $rss->getItem(1); $articleFirst = $rss->getFirst(); self::assertEquals($article1, $articleFirst); $links = []; foreach($rss as $article) { $links[] = sprintf('%s %s', $article->link, SRSSTools::formatDate('d/m/y', $article->pubDate), $article->title); } self::assertCount(4, $links, var_export($links, true)); $rssArray = $rss->toArray(); self::assertCount(11, $rssArray, var_export($rssArray, true)); // 11 elements in RSS $rss->save($this->saved); self::assertFileExists($this->saved); } }