mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Possible workaround for toImage() test.
This commit is contained in:
parent
d0feb76cef
commit
4e5d19e317
@ -988,15 +988,19 @@ while($row = $sql->fetch())
|
||||
|
||||
$this->tp->setConvertToWebP(true);
|
||||
$result6 = $this->tp->toImage($src);
|
||||
$tempDir = str_replace(['C:','\\'],['','/'],sys_get_temp_dir()).'/'; // FIXME
|
||||
|
||||
|
||||
$expected = '<picture>
|
||||
<source type="image/webp" srcset="'.$tempDir.'thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=80&h=80&type=webp">
|
||||
<source type="image/webp" srcset="'.$tempDir.'thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=320&h=320&type=webp 4x">
|
||||
<source type="image/jpeg" srcset="'.$tempDir.'thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=320&h=320 4x">
|
||||
<img class="img-responsive img-fluid" src="'.$tempDir.'thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=80&h=80" alt="butterfly.jpg" width="80" height="80" />
|
||||
<source type="image/webp" srcset="thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=80&h=80&type=webp">
|
||||
<source type="image/webp" srcset="thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=320&h=320&type=webp 4x">
|
||||
<source type="image/jpeg" srcset="thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=320&h=320 4x">
|
||||
<img class="img-responsive img-fluid" src="thumb.php?src=e_PLUGIN%2Fgallery%2Fimages%2Fbutterfly.jpg&w=80&h=80" alt="butterfly.jpg" width="80" height="80" />
|
||||
</picture>';
|
||||
|
||||
$tempDir = str_replace(['C:','\\'],['','/'], sys_get_temp_dir()).'/'; // FIXME
|
||||
|
||||
$result6 = str_replace($tempDir, '', $result6);
|
||||
|
||||
$this->assertSame($expected,$result6);
|
||||
$this->tp->setConvertToWebP(false);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user