Throw exception if option is not recognised

This commit is contained in:
Brabli
2022-08-29 23:32:12 +01:00
parent eb2bea62a7
commit 03212310fd
2 changed files with 19 additions and 4 deletions

View File

@@ -299,4 +299,11 @@ class IconExtensionTest extends TestCase
$this->assertMatchesRegularExpression('/<svg.+class=".*group-hover:fill-white.*".*>/', $contents);
$this->assertMatchesRegularExpression('/<svg.+class=".*group-hover:stroke-white.*".*>/', $contents);
}
public function testThrowsIfInvalidOptionPassed(): void
{
$this->expectException(\InvalidArgumentException::class);
$this->icon->renderIcon(['icon' => self::ICON, 'fake-key-should-throw' => null]);
}
}