1
0
mirror of https://github.com/Chouchen/ShikiryuRSS.git synced 2025-09-08 01:54:31 +02:00

🔒 Add formator

Closes #3
This commit is contained in:
2023-04-17 14:28:01 +02:00
parent 6fcf240f72
commit 44c4833069
23 changed files with 571 additions and 367 deletions

View File

@@ -8,10 +8,10 @@ class MediaTest extends TestCase
public function testImages(): void
{
$rss = SRSS::read(__DIR__.'/resources/media/cnn.xml');
self::assertEquals('CNN.com - RSS Channel - Entertainment', $rss->title);
self::assertEquals('<![CDATA[ CNN.com - RSS Channel - Entertainment ]]>', $rss->title);
$first_item = $rss->getFirst();
self::assertEquals('Kirstie Alley, \'Cheers\' and \'Veronica\'s Closet\' star, dead at 71', $first_item->title);
self::assertEquals('<![CDATA[ Kirstie Alley, \'Cheers\' and \'Veronica\'s Closet\' star, dead at 71 ]]>', $first_item->title);
self::assertEquals('https://cdn.cnn.com/cnnnext/dam/assets/221205172141-kirstie-alley-2005-super-169.jpg', $first_item->medias[0]->url);
self::assertTrue($rss->isValid(), var_export($rss->channel->validated, true));
@@ -20,7 +20,7 @@ class MediaTest extends TestCase
public function testMusicVideo(): void
{
$rss = SRSS::read(__DIR__.'/resources/media/music-video.xml');
self::assertEquals('Music Videos 101', $rss->title);
self::assertEquals('<![CDATA[ Music Videos 101 ]]>', $rss->title);
self::assertCount(1, $rss->items);