Get tests passing
This commit is contained in:
@@ -227,7 +227,7 @@ class IconExtensionTest extends TestCase
|
||||
$this->assertDoesNotMatchRegularExpression('/fill:\s*rgb\(0,\s*0,\s*0\)\s*/', $content);
|
||||
}
|
||||
|
||||
public function testThrowsIfPalleteIsNotFound(): void
|
||||
public function testThrowsIfColourPalleteIsNotFound(): void
|
||||
{
|
||||
$this->expectException(PalleteNotFound::class);
|
||||
$this->icon->renderIcon(['icon' => self::ICON, 'colour' => 'red']);
|
||||
@@ -240,5 +240,18 @@ class IconExtensionTest extends TestCase
|
||||
$this->assertMatchesRegularExpression('/<svg.*?class=".*?stroke-white?.*>/', $contents);
|
||||
}
|
||||
|
||||
public function testThrowsIfHoverPalleteIsNotFound(): void
|
||||
{
|
||||
$this->expectException(PalleteNotFound::class);
|
||||
$this->icon->renderIcon(['icon' => self::ICON, 'hover' => 'red']);
|
||||
}
|
||||
|
||||
public function testSvgClassContainsHoverPalleteClasses(): void
|
||||
{
|
||||
$contents = $this->icon->renderIcon(['icon' => self::ICON, 'hover' => 'white']);
|
||||
$this->assertMatchesRegularExpression('/<svg.+class=".*hover:fill-white.*".*>/', $contents);
|
||||
$this->assertMatchesRegularExpression('/<svg.+class=".*hover:stroke-white.*".*>/', $contents);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user