2019-01-21 19:22:30 +03:00
|
|
|
<?php
|
2022-07-01 16:10:30 +03:00
|
|
|
|
2019-01-21 19:22:30 +03:00
|
|
|
/**
|
|
|
|
* AtomFormat - RFC 4287: The Atom Syndication Format
|
|
|
|
* https://tools.ietf.org/html/rfc4287
|
|
|
|
*/
|
|
|
|
|
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-01-21 19:22:30 +03:00
|
|
|
|
2022-06-08 03:17:32 +03:00
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-01-21 19:22:30 +03:00
|
|
|
|
2022-06-08 03:17:32 +03:00
|
|
|
class AtomFormatTest extends BaseFormatTest
|
|
|
|
{
|
|
|
|
private const PATH_EXPECTED = self::PATH_SAMPLES . 'expectedAtomFormat/';
|
2019-01-21 19:22:30 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @dataProvider sampleProvider
|
|
|
|
* @runInSeparateProcess
|
|
|
|
*/
|
2022-06-08 03:17:32 +03:00
|
|
|
public function testOutput(string $name, string $path)
|
|
|
|
{
|
|
|
|
$data = $this->formatData('Atom', $this->loadSample($path));
|
|
|
|
$this->assertNotFalse(simplexml_load_string($data));
|
2019-01-21 19:22:30 +03:00
|
|
|
|
2022-06-08 03:17:32 +03:00
|
|
|
$expected = self::PATH_EXPECTED . $name . '.xml';
|
|
|
|
$this->assertXmlStringEqualsXmlFile($expected, $data);
|
2019-01-21 19:22:30 +03:00
|
|
|
}
|
|
|
|
}
|