Formats: Remove display & related method (#2776)

Format should not be responsible for sending HTTP response.
This commit is contained in:
Jan Tojnar 2022-06-07 18:05:33 +02:00 committed by GitHub
parent e85932b1a5
commit fb501652d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 11 additions and 178 deletions

View file

@ -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();
}
}