mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 23:55:24 +02:00
Formats: Remove display & related method (#2776)
Format should not be responsible for sending HTTP response.
This commit is contained in:
parent
e85932b1a5
commit
fb501652d5
13 changed files with 11 additions and 178 deletions
|
@ -15,21 +15,6 @@ class MrssFormatTest extends TestCase {
|
|||
private $format;
|
||||
private $data;
|
||||
|
||||
/**
|
||||
* @dataProvider sampleProvider
|
||||
* @runInSeparateProcess
|
||||
* @requires function xdebug_get_headers
|
||||
*/
|
||||
public function testHeaders($path) {
|
||||
$this->setSample($path);
|
||||
$this->initFormat();
|
||||
|
||||
$this->assertContains(
|
||||
'Content-Type: application/rss+xml; charset=' . $this->format->getCharset(),
|
||||
xdebug_get_headers()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider sampleProvider
|
||||
* @runInSeparateProcess
|
||||
|
@ -82,9 +67,7 @@ class MrssFormatTest extends TestCase {
|
|||
$this->format->setExtraInfos($this->sample->meta);
|
||||
$this->format->setLastModified(strtotime('2000-01-01 12:00:00 UTC'));
|
||||
|
||||
$_ = $this->format->display();
|
||||
$this->data = $this->getActualOutput();
|
||||
$this->data = $this->format->stringify();
|
||||
$this->assertNotFalse(simplexml_load_string($this->data));
|
||||
ob_clean();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue