mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #731 from dereuromark/2.3-fix-rss-test
2.3 fix rss test
This commit is contained in:
commit
eb33929829
1 changed files with 7 additions and 5 deletions
|
@ -642,13 +642,12 @@ class RssHelperTest extends CakeTestCase {
|
|||
)
|
||||
);
|
||||
$result = $this->Rss->item(null, $item);
|
||||
if (!function_exists('finfo_open') &&
|
||||
(function_exists('mime_content_type') && false === mime_content_type($tmpFile))
|
||||
) {
|
||||
$type = false;
|
||||
if (!function_exists('mime_content_type')) {
|
||||
$type = null;
|
||||
} else {
|
||||
$type = 'text/plain';
|
||||
$type = mime_content_type($tmpFile);
|
||||
}
|
||||
|
||||
$expected = array(
|
||||
'<item',
|
||||
'<title',
|
||||
|
@ -679,6 +678,9 @@ class RssHelperTest extends CakeTestCase {
|
|||
'/category',
|
||||
'/item'
|
||||
);
|
||||
if ($type === null) {
|
||||
unset($expected['enclosure']['type']);
|
||||
}
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$File->delete();
|
||||
|
|
Loading…
Reference in a new issue