summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-04 18:22:12 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-04 18:22:12 +0200
commitb5f4871da2218a3bd8e0b179720db1008beb5dfb (patch)
tree4bcb9e6ce0d5fe10b6209f20aa84a6e706a44b1d /tests
parentd14ffa79073d4ed6a9dd470ff6fd121ce2dc096b (diff)
further cleanup
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/articleenhancer/XPathArticleEnhancerTest.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
index 2f6f5688e..e7b3d19dd 100644
--- a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
+++ b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
@@ -127,7 +127,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue($file));
$result = $this->testEnhancer->enhance($item);
- $this->assertEquals('<span>hiho</span>', $result->getBody());
+ $this->assertEquals('<div><span>hiho</span></div>', $result->getBody());
}
@@ -156,7 +156,8 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue($file));
$result = $this->testEnhancer->enhance($item);
- $this->assertEquals('<div>hiho</div><div>rawr</div>', $result->getBody());
+ $this->assertEquals('<div><div>hiho</div><div>rawr</div></div>',
+ $result->getBody());
}
@@ -260,7 +261,11 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue($file));
$result = $this->testEnhancer->enhance($item);
- $this->assertEquals('<a target="_blank" href="https://www.explosm.net/a/relative/url.html?a=1#b">link</a><a target="_blank" href="https://www.explosm.net/all/b/relative/url.html">link2</a><img src="https://www.explosm.net/another/relative/link.jpg">', $result->getBody());
+ $this->assertEquals('<div>' .
+ '<a target="_blank" href="https://www.explosm.net/a/relative/url.html?a=1#b">link</a>' .
+ '<a target="_blank" href="https://www.explosm.net/all/b/relative/url.html">link2</a>' .
+ '<img src="https://www.explosm.net/another/relative/link.jpg">' .
+ '</div>', $result->getBody());
}
public function testTransformRelativeUrlSpecials() {
@@ -285,7 +290,9 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue($file));
$result = $this->testEnhancer->enhance($item);
- $this->assertEquals('<img src="https://username:secret@www.explosm.net/all/relative/url.png?a=1&amp;b=2">', $result->getBody());
+ $this->assertEquals(
+ '<div><img src="https://username:secret@www.explosm.net/all/relative/url.png?a=1&amp;b=2"></div>',
+ $result->getBody());
}
public function testDontTransformAbsoluteUrlsAndMails() {
@@ -312,8 +319,10 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
$result = $this->testEnhancer->enhance($item);
$this->assertEquals(
+ '<div>' .
'<img src="http://www.url.com/absolute/url.png">' .
- '<a target="_blank" href="mailto:test@testsite.com">mail</a>',
+ '<a target="_blank" href="mailto:test@testsite.com">mail</a>' .
+ '</div>',
$result->getBody()
);
}