public function testRemoveRemoteImages()
{
// In format (expected value, input value)
$tests = [['<img width="10" SRC="about:blank" />', '<img width="10" SRC="http://domain.tld/picture.png" />'], ['<body bgcolor="green" BACKGROUND="" >', '<body bgcolor="green" BACKGROUND="http://domain.tld/picture.png" >'], ['<a href="#" style="font: sans-serif; background : center center ; color: green;" >', '<a href="#" style="font: sans-serif; background : center center url(\'https://domain.tld/picture.png\'); color: green;" >'], ['<a href="#" style="font: sans-serif; color: green;" >', '<a href="#" style="font: sans-serif; background-image : url(\'http://domain.tld/picture.png\'); color: green;" >'], ['<li href="#" style="font: sans-serif; list-style : circle ; color: green;" >', '<li href="#" style="font: sans-serif; list-style : circle url(\'http://domain.tld/picture.png\'); color: green;" >'], ['<li href="#" style="font: sans-serif; color: green;" >', '<li href="#" style="font: sans-serif; list-style-image : url(\'http://domain.tld/picture.png\'); color: green;" >'], ['<img src="data:" />', '<img src="data:" />']];
foreach ($tests as $test) {
$this->assertEquals($test[0], Html::removeRemoteImages($test[1]));
}
}