Skip to content

Commit d49aaa0

Browse files
committed
Small fixes and version update.
1 parent de77e73 commit d49aaa0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/HTMLServerComponentsCompiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class HTMLServerComponentsCompiler
1616
/**
1717
*
1818
*/
19-
const VERSION = '0.2.0';
19+
const VERSION = '0.2.3';
2020

2121
/**
2222
*
@@ -41,7 +41,7 @@ function addAlias($alias, $original)
4141
*/
4242
public function process($html)
4343
{
44-
$domDocument = new HTML5DOMDocument();
44+
$domDocument = new IvoPetkov\HTML5DOMDocument();
4545
$domDocument->loadHTML($html);
4646
$componentElements = $domDocument->getElementsByTagName('component');
4747
$componentElementsCount = $componentElements->length;

tests/Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function testProccessHTML()
2222

2323
$compiler = new HTMLServerComponentsCompiler();
2424
$result = $compiler->process('<component src="file:' . $fullFilename . '"/>');
25-
$expectedResult = '<!DOCTYPE html><html><head><meta custom="value"></head><body>text1</body></html>';
25+
$expectedResult = '<!DOCTYPE html>' . "\n" . '<html><head><meta custom="value"></head><body>text1</body></html>';
2626
$this->assertTrue($result === $expectedResult);
2727

2828
$compiler = new HTMLServerComponentsCompiler();
@@ -31,7 +31,7 @@ public function testProccessHTML()
3131
. '<component src="file:' . $fullFilename . '"/>'
3232
. 'text2'
3333
. '</body></html>');
34-
$expectedResult = '<!DOCTYPE html><html><head><meta custom="value"></head><body>'
34+
$expectedResult = '<!DOCTYPE html>' . "\n" . '<html><head><meta custom="value"></head><body>'
3535
. 'text0'
3636
. 'text1'
3737
. 'text2'

0 commit comments

Comments
 (0)