summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorbastei <bastei@users.noreply.github.com>2013-09-26 06:45:47 +0200
committerbastei <bastei@users.noreply.github.com>2013-09-26 06:45:47 +0200
commitca0b341401d1f577a4d14f02161ea794c8cb1d28 (patch)
tree6197b04d6c670c7aa0e2051c67aa6adbb8e751c0 /tests
parent6d5e8373a9dd79c16a028d4799a6325b885f143f (diff)
ArticleEnhancer: convert relative urls to html characters
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/utility/articleenhancer/ArticleEnhancerTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/utility/articleenhancer/ArticleEnhancerTest.php b/tests/unit/utility/articleenhancer/ArticleEnhancerTest.php
index ce105db49..f252c4fac 100644
--- a/tests/unit/utility/articleenhancer/ArticleEnhancerTest.php
+++ b/tests/unit/utility/articleenhancer/ArticleEnhancerTest.php
@@ -246,7 +246,7 @@ class ArticleEnhancerTest extends \OCA\AppFramework\Utility\TestUtility {
$file->headers = array("content-type"=>"text/html; charset=utf-8");
$file->body = '<html>
<body>
- <img src="relative/url.png">
+ <img src="relative/url.png?a=1&b=2">
</body>
</html>';
$item = new Item();
@@ -260,11 +260,11 @@ class ArticleEnhancerTest extends \OCA\AppFramework\Utility\TestUtility {
->will($this->returnValue($file));
$this->purifier->expects($this->once())
->method('purify')
- ->with($this->equalTo('<img src="https://username:secret@www.explosm.net/all/relative/url.png">'))
- ->will($this->returnValue('<img src="https://username:secret@www.explosm.net/all/relative/url.png">'));
+ ->with($this->equalTo('<img src="https://username:secret@www.explosm.net/all/relative/url.png?a=1&amp;b=2">'))
+ ->will($this->returnValue('<img src="https://username:secret@www.explosm.net/all/relative/url.png?a=1&amp;b=2">'));
$result = $this->testEnhancer->enhance($item);
- $this->assertEquals('<img src="https://username:secret@www.explosm.net/all/relative/url.png">', $result->getBody());
+ $this->assertEquals('<img src="https://username:secret@www.explosm.net/all/relative/url.png?a=1&amp;b=2">', $result->getBody());
}
public function testDontTransformAbsoluteUrlsAndMails() {