Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #731 from dereuromark/2.3-fix-rss-test

2.3 fix rss test
  • Loading branch information...
commit eb33929829ad80a6d280fa447252d447b831c639 2 parents a392892 + 15cf55d
@markstory markstory authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 lib/Cake/Test/Case/View/Helper/RssHelperTest.php
View
12 lib/Cake/Test/Case/View/Helper/RssHelperTest.php
@@ -642,13 +642,12 @@ public function testItemEnclosureLength() {
)
);
$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 @@ public function testItemEnclosureLength() {
'/category',
'/item'
);
+ if ($type === null) {
+ unset($expected['enclosure']['type']);
+ }
$this->assertTags($result, $expected);
$File->delete();
Please sign in to comment.
Something went wrong with that request. Please try again.