Skip to content
This repository
Browse code

different approach on the failing test

  • Loading branch information...
commit 15cf55d444871d30535f077f1fbc55257b123aa0 1 parent 93957bc
Mark authored July 22, 2012
10  lib/Cake/Test/Case/View/Helper/RssHelperTest.php
@@ -642,12 +642,12 @@ public function testItemEnclosureLength() {
642 642
 			)
643 643
 		);
644 644
 		$result = $this->Rss->item(null, $item);
645  
-		if (!function_exists('finfo_open') || !function_exists('mime_content_type') || mime_content_type($tmpFile) === false
646  
-		) {
647  
-			$type = false;
  645
+		if (!function_exists('mime_content_type')) {
  646
+			$type = null;
648 647
 		} else {
649  
-			$type = 'text/plain';
  648
+			$type = mime_content_type($tmpFile);
650 649
 		}
  650
+		
651 651
 		$expected = array(
652 652
 			'<item',
653 653
 			'<title',
@@ -678,7 +678,7 @@ public function testItemEnclosureLength() {
678 678
 			'/category',
679 679
 			'/item'
680 680
 		);
681  
-		if (!$type) {
  681
+		if ($type === null) {
682 682
 			unset($expected['enclosure']['type']);
683 683
 		}
684 684
 		$this->assertTags($result, $expected);

0 notes on commit 15cf55d

Please sign in to comment.
Something went wrong with that request. Please try again.