mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 08:37:30 +02:00
Reformat codebase v4 (#2872)
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JsonFormat - JSON Feed Version 1
|
||||
* https://jsonfeed.org/version/1
|
||||
@@ -10,18 +11,20 @@ require_once __DIR__ . '/BaseFormatTest.php';
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class JsonFormatTest extends BaseFormatTest {
|
||||
private const PATH_EXPECTED = self::PATH_SAMPLES . 'expectedJsonFormat/';
|
||||
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());
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
$expected = self::PATH_EXPECTED . $name . '.json';
|
||||
$this->assertJsonStringEqualsJsonFile($expected, $data);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user