2019-02-06 19:18:33 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* MrssFormat - RSS 2.0 + Media RSS
|
|
|
|
* http://www.rssboard.org/rss-specification
|
|
|
|
* http://www.rssboard.org/media-rss
|
|
|
|
*/
|
|
|
|
|
2022-06-08 00:22:33 +03:00
|
|
|
namespace RssBridge\Tests\Formats;
|
|
|
|
|
2022-06-08 03:17:32 +03:00
|
|
|
require_once __DIR__ . '/BaseFormatTest.php';
|
2019-02-06 19:18:33 +03:00
|
|
|
|
2022-06-08 03:17:32 +03:00
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-02-06 19:18:33 +03:00
|
|
|
|
2022-06-08 03:17:32 +03:00
|
|
|
class MrssFormatTest extends BaseFormatTest {
|
|
|
|
private const PATH_EXPECTED = self::PATH_SAMPLES . 'expectedMrssFormat/';
|
2019-02-06 19:18:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @dataProvider sampleProvider
|
|
|
|
* @runInSeparateProcess
|
|
|
|
*/
|
2022-06-08 03:17:32 +03:00
|
|
|
public function testOutput(string $name, string $path) {
|
|
|
|
$data = $this->formatData('Mrss', $this->loadSample($path));
|
|
|
|
$this->assertNotFalse(simplexml_load_string($data));
|
2019-02-06 19:18:33 +03:00
|
|
|
|
2022-06-08 03:17:32 +03:00
|
|
|
$expected = self::PATH_EXPECTED . $name . '.xml';
|
|
|
|
$this->assertXmlStringEqualsXmlFile($expected, $data);
|
2019-02-06 19:18:33 +03:00
|
|
|
}
|
|
|
|
}
|