Browse files

different approach on the failing test

  • Loading branch information...
1 parent 93957bc commit 15cf55d444871d30535f077f1fbc55257b123aa0 @dereuromark dereuromark committed Jul 22, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/Cake/Test/Case/View/Helper/RssHelperTest.php
View
10 lib/Cake/Test/Case/View/Helper/RssHelperTest.php
@@ -642,12 +642,12 @@ public function testItemEnclosureLength() {
)
);
$result = $this->Rss->item(null, $item);
- if (!function_exists('finfo_open') || !function_exists('mime_content_type') || mime_content_type($tmpFile) === false
- ) {
- $type = false;
+ if (!function_exists('mime_content_type')) {
+ $type = null;
} else {
- $type = 'text/plain';
+ $type = mime_content_type($tmpFile);
}
+
$expected = array(
'<item',
'<title',
@@ -678,7 +678,7 @@ public function testItemEnclosureLength() {
'/category',
'/item'
);
- if (!$type) {
+ if ($type === null) {
unset($expected['enclosure']['type']);
}
$this->assertTags($result, $expected);

0 comments on commit 15cf55d

Please sign in to comment.