mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[M3uFormat] add basic m3u tests
those are a bit silly, but let's be coherent with other tests
This commit is contained in:
parent
2597cff5e0
commit
624fc8d551
29
tests/Formats/M3uFormatTest.php
Normal file
29
tests/Formats/M3uFormatTest.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* M3uFormat
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace RssBridge\Tests\Formats;
|
||||||
|
|
||||||
|
require_once __DIR__ . '/BaseFormatTest.php';
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class M3uFormatTest extends BaseFormatTest
|
||||||
|
{
|
||||||
|
private const PATH_EXPECTED = self::PATH_SAMPLES . 'expectedM3uFormat/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider sampleProvider
|
||||||
|
* @runInSeparateProcess
|
||||||
|
*/
|
||||||
|
public function testOutput(string $name, string $path)
|
||||||
|
{
|
||||||
|
$data = $this->formatData('M3u', $this->loadSample($path));
|
||||||
|
|
||||||
|
$expected = file_get_contents(self::PATH_EXPECTED . $name . '.m3u');
|
||||||
|
$this->assertEquals($expected, $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
1
tests/Formats/samples/expectedM3uFormat/feed.common.m3u
Normal file
1
tests/Formats/samples/expectedM3uFormat/feed.common.m3u
Normal file
@ -0,0 +1 @@
|
|||||||
|
#EXTM3U
|
1
tests/Formats/samples/expectedM3uFormat/feed.empty.m3u
Normal file
1
tests/Formats/samples/expectedM3uFormat/feed.empty.m3u
Normal file
@ -0,0 +1 @@
|
|||||||
|
#EXTM3U
|
@ -0,0 +1 @@
|
|||||||
|
#EXTM3U
|
@ -0,0 +1 @@
|
|||||||
|
#EXTM3U
|
Loading…
Reference in New Issue
Block a user