1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Add instance url to the downloaded images

This commit is contained in:
Jeremy Benoist 2016-10-30 19:50:00 +01:00
parent 48656e0eaa
commit 41ada277f0
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
3 changed files with 20 additions and 2 deletions

View file

@ -27,9 +27,11 @@ class DownloadImagesTest extends \PHPUnit_Framework_TestCase
$logger = new Logger('test', array($logHandler));
$download = new DownloadImages($client, sys_get_temp_dir().'/wallabag_test', $logger);
$download->setWallabagUrl('http://wallabag.io/');
$res = $download->processHtml('<div><img src="http://i.imgur.com/T9qgcHc.jpg" /></div>', 'http://imgur.com/gallery/WxtWY');
$this->assertContains('/assets/images/4/2/4258f71e/c638b4c2.png', $res);
$this->assertContains('http://wallabag.io/assets/images/4/2/4258f71e/c638b4c2.png', $res);
}
public function testProcessHtmlWithBadImage()