Remove fill and stroke attributes where their value was black
This commit is contained in:
@@ -194,4 +194,22 @@ class IconExtensionTest extends TestCase
|
||||
$this->expectException(\Exception::class);
|
||||
new IconExtension(['/'], [['stroke' => '']]);
|
||||
}
|
||||
|
||||
public function testBlackStrokeAttributeValuesAreRemoved(): void
|
||||
{
|
||||
$content = $this->icon->renderIcon(['icon' => self::ICON]);
|
||||
$this->assertDoesNotMatchRegularExpression('/stroke="\s*#000\s*"/', $content);
|
||||
$this->assertDoesNotMatchRegularExpression('/stroke="\s*#000000\s*"/', $content);
|
||||
$this->assertDoesNotMatchRegularExpression('/stroke="\s*#black\s*"/', $content);
|
||||
$this->assertDoesNotMatchRegularExpression('/stroke="\s*rgb\(0,\s*0,\s*0\)\s*"/', $content);
|
||||
}
|
||||
|
||||
public function testBlackFillAttributeValuesAreRemoved(): void
|
||||
{
|
||||
$content = $this->icon->renderIcon(['icon' => self::ICON]);
|
||||
$this->assertDoesNotMatchRegularExpression('/fill="\s*#000\s*"/', $content);
|
||||
$this->assertDoesNotMatchRegularExpression('/fill="\s*#000000\s*"/', $content);
|
||||
$this->assertDoesNotMatchRegularExpression('/fill="\s*#black\s*"/', $content);
|
||||
$this->assertDoesNotMatchRegularExpression('/fill="\s*rgb\(0,\s*0,\s*0\)\s*"/', $content);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user