diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php index d2ba3cd..8cecc65 100755 --- a/src/HtmlBuilder.php +++ b/src/HtmlBuilder.php @@ -78,7 +78,7 @@ class HtmlBuilder { $attributes['src'] = $this->url->asset($url, $secure); - return $this->toHtmlString('' . PHP_EOL); + return $this->toHtmlString(''); } /** @@ -98,7 +98,7 @@ class HtmlBuilder $attributes['href'] = $this->url->asset($url, $secure); - return $this->toHtmlString('attributes($attributes) . '>' . PHP_EOL); + return $this->toHtmlString('attributes($attributes) . '>'); } /** @@ -136,7 +136,7 @@ class HtmlBuilder $attributes['href'] = $this->url->asset($url, $secure); - return $this->toHtmlString('attributes($attributes) . '>' . PHP_EOL); + return $this->toHtmlString('attributes($attributes) . '>'); } /** @@ -511,7 +511,7 @@ class HtmlBuilder $attributes = array_merge($defaults, $attributes); - return $this->toHtmlString('attributes($attributes) . '>' . PHP_EOL); + return $this->toHtmlString('attributes($attributes) . '>'); } /** @@ -526,7 +526,7 @@ class HtmlBuilder public function tag($tag, $content, array $attributes = []) { $content = is_array($content) ? implode(PHP_EOL, $content) : $content; - return $this->toHtmlString('<' . $tag . $this->attributes($attributes) . '>' . PHP_EOL . $this->toHtmlString($content) . PHP_EOL . '' . $tag . '>' . PHP_EOL); + return $this->toHtmlString('<' . $tag . $this->attributes($attributes) . '>' . $this->toHtmlString($content) . '' . $tag . '>'); } /** diff --git a/tests/HtmlBuilderTest.php b/tests/HtmlBuilderTest.php index b5d7d99..a5bcb8b 100644 --- a/tests/HtmlBuilderTest.php +++ b/tests/HtmlBuilderTest.php @@ -65,7 +65,7 @@ class HtmlBuilderTest extends PHPUnit_Framework_TestCase { $result = $this->htmlBuilder->meta('description', 'Lorem ipsum dolor sit amet.'); - $this->assertEquals('' . PHP_EOL, $result); + $this->assertEquals('', $result); } public function testTag() @@ -83,17 +83,17 @@ class HtmlBuilderTest extends PHPUnit_Framework_TestCase $result4 = $this->htmlBuilder->tag('div', $content, ['class' => 'row']); - $this->assertEquals('
' . PHP_EOL . 'Lorem ipsum dolor sit amet.' . PHP_EOL . '
' . PHP_EOL, $result1); - $this->assertEquals('' . PHP_EOL . 'Lorem ipsum dolor sit amet.' . PHP_EOL . '
' . PHP_EOL, $result2); - $this->assertEquals('Lorem ipsum dolor sit amet.
' . PHP_EOL . 'Lorem ipsum dolor sit amet.
', $result1); + $this->assertEquals('Lorem ipsum dolor sit amet.
', $result2); + $this->assertEquals('Lorem ipsum dolor sit amet.