diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-30 19:50:00 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-30 19:50:00 +0100 |
commit | 41ada277f066ea57947bce05bcda63962b7fea55 (patch) | |
tree | 2c81f8bc70cc2e0a625924ccdb5d9bc649d8292d /tests | |
parent | 48656e0eaac006a80f21e9aec8900747fe76283a (diff) | |
download | wallabag-41ada277f066ea57947bce05bcda63962b7fea55.tar.gz wallabag-41ada277f066ea57947bce05bcda63962b7fea55.tar.zst wallabag-41ada277f066ea57947bce05bcda63962b7fea55.zip |
Add instance url to the downloaded images
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php b/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php index e000d681..33d2e389 100644 --- a/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php +++ b/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php | |||
@@ -27,9 +27,11 @@ class DownloadImagesTest extends \PHPUnit_Framework_TestCase | |||
27 | $logger = new Logger('test', array($logHandler)); | 27 | $logger = new Logger('test', array($logHandler)); |
28 | 28 | ||
29 | $download = new DownloadImages($client, sys_get_temp_dir().'/wallabag_test', $logger); | 29 | $download = new DownloadImages($client, sys_get_temp_dir().'/wallabag_test', $logger); |
30 | $download->setWallabagUrl('http://wallabag.io/'); | ||
31 | |||
30 | $res = $download->processHtml('<div><img src="http://i.imgur.com/T9qgcHc.jpg" /></div>', 'http://imgur.com/gallery/WxtWY'); | 32 | $res = $download->processHtml('<div><img src="http://i.imgur.com/T9qgcHc.jpg" /></div>', 'http://imgur.com/gallery/WxtWY'); |
31 | 33 | ||
32 | $this->assertContains('/assets/images/4/2/4258f71e/c638b4c2.png', $res); | 34 | $this->assertContains('http://wallabag.io/assets/images/4/2/4258f71e/c638b4c2.png', $res); |
33 | } | 35 | } |
34 | 36 | ||
35 | public function testProcessHtmlWithBadImage() | 37 | public function testProcessHtmlWithBadImage() |