Jelajahi Sumber

Replaced '\r\n' with '\n' in HTML comparison unit tests.

Taddeus Kroes 13 tahun lalu
induk
melakukan
09845b1b74
1 mengubah file dengan 9 tambahan dan 9 penghapusan
  1. 9 9
      tests/test_template.php

+ 9 - 9
tests/test_template.php

@@ -95,17 +95,9 @@ class TemplateTest extends PHPUnit_Framework_TestCase {
 		return $rp->getValue($object);
 	}
 	
-	function test_parse_blocks_simple() {
-		$root_block = $this->get_property($this->tpl, 'root_block');
-		$this->assert_is_block_node($root_block, null, 1);
-		
-		list($child) = $root_block->get_children();
-		$this->assert_is_html_node($child, 'test');
-	}
-	
 	function assert_is_html_node($node, $content) {
 		$this->assertEquals('html', $node->get_name());
-		$this->assertEquals($content, $node->get('content'));
+		$this->assertEquals($content, str_replace("\r\n", "\n", $node->get('content')));
 		$this->assertEquals(array(), $node->get_children());
 	}
 	
@@ -122,6 +114,14 @@ class TemplateTest extends PHPUnit_Framework_TestCase {
 		$this->assertEquals(array(), $node->get_children());
 	}
 	
+	function test_parse_blocks_simple() {
+		$root_block = $this->get_property($this->tpl, 'root_block');
+		$this->assert_is_block_node($root_block, null, 1);
+		
+		list($child) = $root_block->get_children();
+		$this->assert_is_html_node($child, 'test');
+	}
+	
 	/**
 	 * @depends test_parse_blocks_simple
 	 */