mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-21 23:07:53 +00:00
4f75591060
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
31 lines
774 B
PHP
31 lines
774 B
PHP
<?php
|
|
|
|
/**
|
|
* JsonFormat - JSON Feed Version 1
|
|
* https://jsonfeed.org/version/1
|
|
*/
|
|
|
|
namespace RssBridge\Tests\Formats;
|
|
|
|
require_once __DIR__ . '/BaseFormatTest.php';
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class JsonFormatTest extends BaseFormatTest
|
|
{
|
|
private const PATH_EXPECTED = self::PATH_SAMPLES . 'expectedJsonFormat/';
|
|
|
|
/**
|
|
* @dataProvider sampleProvider
|
|
* @runInSeparateProcess
|
|
*/
|
|
public function testOutput(string $name, string $path)
|
|
{
|
|
$data = $this->formatData('Json', $this->loadSample($path));
|
|
$this->assertNotNull(json_decode($data), 'invalid JSON output: ' . json_last_error_msg());
|
|
|
|
$expected = self::PATH_EXPECTED . $name . '.json';
|
|
$this->assertJsonStringEqualsJsonFile($expected, $data);
|
|
}
|
|
}
|