Add colour classes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user