1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-06 00:27:27 +02:00

refactor: ./tests (#2649)

* refactor: ./tests

* test: consolidate testsuites

* refactor: move config setup into rssbridge.php

Makes it easier to unit test.

* lint
This commit is contained in:
Dag
2022-04-13 21:04:10 +02:00
committed by GitHub
parent 183004f954
commit d62b977394
11 changed files with 20 additions and 42 deletions

View File

@@ -4,7 +4,6 @@
* http://www.rssboard.org/rss-specification
* http://www.rssboard.org/media-rss
*/
require_once __DIR__ . '/../lib/rssbridge.php';
use PHPUnit\Framework\TestCase;
@@ -42,8 +41,6 @@ class MrssFormatTest extends TestCase {
$this->assertXmlStringEqualsXmlFile($this->sample->expected, $this->data);
}
////////////////////////////////////////////////////////////////////////////
public function sampleProvider() {
$samples = array();
foreach (glob(self::PATH_SAMPLES . '*.json') as $path) {
@@ -85,7 +82,8 @@ class MrssFormatTest 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->assertNotFalse(simplexml_load_string($this->data));
ob_clean();
}