Test for black fill and stroke style removal
This commit is contained in:
@@ -200,6 +200,15 @@ class IconExtensionTest extends TestCase
|
||||
$this->assertDoesNotMatchRegularExpression('/stroke="\s*rgb\(0,\s*0,\s*0\)\s*"/', $content);
|
||||
}
|
||||
|
||||
public function testBlackStrokeStylesAreRemoved(): 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]);
|
||||
@@ -209,6 +218,15 @@ class IconExtensionTest extends TestCase
|
||||
$this->assertDoesNotMatchRegularExpression('/fill="\s*rgb\(0,\s*0,\s*0\)\s*"/', $content);
|
||||
}
|
||||
|
||||
public function testBlackFillStylesAreRemoved(): 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);
|
||||
}
|
||||
|
||||
public function testThrowsIfPalleteIsNotFound(): void
|
||||
{
|
||||
$this->expectException(PalleteNotFound::class);
|
||||
|
||||
Reference in New Issue
Block a user