diff options
author | 2022-04-13 21:04:10 +0200 | |
---|---|---|
committer | 2022-04-13 21:04:10 +0200 | |
commit | d62b9773940cb8f110899ba4737be173d8f21da7 (patch) | |
tree | 6825283980fcaafb7aa5774b68405a5759af67c4 /tests/JsonFormatTest.php | |
parent | 183004f954fe139236e7373e335be4189d37837d (diff) | |
download | rss-bridge-d62b9773940cb8f110899ba4737be173d8f21da7.tar.gz rss-bridge-d62b9773940cb8f110899ba4737be173d8f21da7.tar.zst rss-bridge-d62b9773940cb8f110899ba4737be173d8f21da7.zip |
refactor: ./tests (#2649)
* refactor: ./tests
* test: consolidate testsuites
* refactor: move config setup into rssbridge.php
Makes it easier to unit test.
* lint
Diffstat (limited to 'tests/JsonFormatTest.php')
-rw-r--r-- | tests/JsonFormatTest.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/JsonFormatTest.php b/tests/JsonFormatTest.php index a9417e25..9e19fe8f 100644 --- a/tests/JsonFormatTest.php +++ b/tests/JsonFormatTest.php @@ -41,8 +41,6 @@ class JsonFormatTest extends TestCase { $this->assertJsonStringEqualsJsonFile($this->sample->expected, $this->data); } - //////////////////////////////////////////////////////////////////////////// - public function sampleProvider() { $samples = array(); foreach (glob(self::PATH_SAMPLES . '*.json') as $path) { @@ -84,7 +82,8 @@ class JsonFormatTest extends TestCase { $this->format->setExtraInfos($this->sample->meta); $this->format->setLastModified(strtotime('2000-01-01 12:00:00 UTC')); - $this->data = $this->getActualOutput($this->format->display()); + $_ = $this->format->display(); + $this->data = $this->getActualOutput(); $this->assertNotNull(json_decode($this->data), 'invalid JSON output: ' . json_last_error_msg()); ob_clean(); } |