mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Fix #3322 Use title for alt if no alt is provided
alt has priority over title, so it should be filled if title is filled. Use the title value to fill alt. Unit test updated accordingly.
This commit is contained in:
@@ -609,11 +609,11 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$s=img_picto('title','/fullpath/img.png','',1);
|
||||
print __METHOD__." s=".$s."\n";
|
||||
$this->assertEquals('<img src="/fullpath/img.png" border="0" alt="" title="title">',$s,'testImgPicto3');
|
||||
$this->assertEquals('<img src="/fullpath/img.png" border="0" alt="title" title="title">',$s,'testImgPicto3');
|
||||
|
||||
$s=img_picto('title','/fullpath/img.png','',true);
|
||||
print __METHOD__." s=".$s."\n";
|
||||
$this->assertEquals('<img src="/fullpath/img.png" border="0" alt="" title="title">',$s,'testImgPicto4');
|
||||
$this->assertEquals('<img src="/fullpath/img.png" border="0" alt="title" title="title">',$s,'testImgPicto4');
|
||||
|
||||
$s=img_picto('title:alt','/fullpath/img.png','',true);
|
||||
print __METHOD__." s=".$s."\n";
|
||||
|
||||
Reference in New Issue
Block a user