Commit 09845b1b authored by Taddeus Kroes's avatar Taddeus Kroes

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

parent 56fc98a2
...@@ -95,17 +95,9 @@ class TemplateTest extends PHPUnit_Framework_TestCase { ...@@ -95,17 +95,9 @@ class TemplateTest extends PHPUnit_Framework_TestCase {
return $rp->getValue($object); 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) { function assert_is_html_node($node, $content) {
$this->assertEquals('html', $node->get_name()); $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()); $this->assertEquals(array(), $node->get_children());
} }
...@@ -122,6 +114,14 @@ class TemplateTest extends PHPUnit_Framework_TestCase { ...@@ -122,6 +114,14 @@ class TemplateTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(array(), $node->get_children()); $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 * @depends test_parse_blocks_simple
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment