1
0
mirror of https://github.com/Chouchen/ShikiryuRSS.git synced 2025-09-06 01:14:32 +02:00

♻️ Begins to refactor for media

For #4
This commit is contained in:
2023-04-05 14:44:57 +02:00
parent cec917ad02
commit a55b05d734
16 changed files with 4278 additions and 817 deletions

22
tests/BasicReader.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
use PHPUnit\Framework\TestCase;
use Shikiryu\SRSS\SRSS;
use Shikiryu\SRSS\SRSSException;
class BasicReader extends TestCase
{
public function testReadBasicRSS()
{
$rss = SRSS::read(__DIR__.'/resources/basic.xml');
self::assertEquals('test Home Page', $rss->title);
$first_item = $rss->getFirst();
self::assertEquals('RSS Tutorial', $first_item->title);
}
public function testRssNotFound()
{
$this->expectException(SRSSException::class);
$rss = SRSS::read('not_found.xml');
}
}