+ public function testProcessSingleImageWithBadUrl()
+ {
+ $client = new Client();
+
+ $mock = new Mock([
+ new Response(404, []),
+ ]);
+
+ $client->getEmitter()->attach($mock);
+
+ $logHandler = new TestHandler();
+ $logger = new Logger('test', array($logHandler));
+
+ $download = new DownloadImages($client, sys_get_temp_dir().'/wallabag_test', $logger);
+ $res = $download->processSingleImage('T9qgcHc.jpg', 'http://imgur.com/gallery/WxtWY');
+
+ $this->assertFalse($res, 'Image can not be found, so it will not be replaced');
+ }
+