Add colour classes

This commit is contained in:
Brabli
2022-08-14 22:09:12 +01:00
parent 10c252ea6d
commit 562f841fd3
2 changed files with 20 additions and 4 deletions

View File

@@ -17,6 +17,10 @@ class IconExtensionTest extends TestCase
'primary' => [
'stroke' => 'stroke-primary',
'fill' => 'fill-primary'
],
'white' => [
'stroke' => 'stroke-white',
'fill' => 'fill-white'
]
];
@@ -211,4 +215,12 @@ class IconExtensionTest extends TestCase
$this->icon->renderIcon(['icon' => self::ICON, 'colour' => 'red']);
}
public function testSvgClassContainsPalleteClasses(): void
{
$contents = $this->icon->renderIcon(['icon' => self::ICON, 'colour' => 'white']);
$this->assertMatchesRegularExpression('/<svg.*?class=".*?fill-white.*?>/', $contents);
$this->assertMatchesRegularExpression('/<svg.*?class=".*?stroke-white?.*>/', $contents);
}
}