Remove validation tests
This commit is contained in:
@@ -32,9 +32,6 @@ class IconExtensionTest extends TestCase
|
|||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* @var IconExtension
|
|
||||||
*/
|
|
||||||
private IconExtension $icon;
|
private IconExtension $icon;
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
@@ -42,11 +39,6 @@ class IconExtensionTest extends TestCase
|
|||||||
$this->icon = new IconExtension(['tests/icons'], self::COLOURS);
|
$this->icon = new IconExtension(['tests/icons'], self::COLOURS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInstanceOf(): void
|
|
||||||
{
|
|
||||||
$this->assertInstanceOf(IconExtension::class, $this->icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsWhenPassedAnInvalidIconName(): void
|
public function testThrowsWhenPassedAnInvalidIconName(): void
|
||||||
{
|
{
|
||||||
$this->expectException(IconNotFound::class);
|
$this->expectException(IconNotFound::class);
|
||||||
@@ -151,60 +143,6 @@ class IconExtensionTest extends TestCase
|
|||||||
$this->assertSame(1, $timesMatched);
|
$this->assertSame(1, $timesMatched);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testThrowsIfColoursIsEmpty(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
|
||||||
new IconExtension(['/'], []);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsIfColoursContainsNonArray(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\TypeError::class);
|
|
||||||
new IconExtension(['/'], [99]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsIfColoursContainsNonArrayInbetweenArrays(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\TypeError::class);
|
|
||||||
new IconExtension(['/'], [[], 99, []]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsIfChildArrayDoesntContainStrokeKey(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\Exception::class);
|
|
||||||
new IconExtension(['/'], [['fill' => '', 'fill-hover' => '', 'stroke-hover' => '', 'fill-group-hover' => '', 'stroke-group-hover' => '']]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsIfChildArrayDoesntContainFillKey(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\Exception::class);
|
|
||||||
new IconExtension(['/'], [['stroke' => '', 'fill-hover' => '', 'stroke-hover' => '', 'fill-group-hover' => '', 'stroke-group-hover' => '']]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsIfChildArrayDoesntContainFillHoverKey(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\Exception::class);
|
|
||||||
new IconExtension(['/'], [['fill' => '', 'stroke' => '', 'stroke-hover' => '', 'fill-group-hover' => '', 'stroke-group-hover' => '']]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsIfChildArrayDoesntContainStrokeHoverKey(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\Exception::class);
|
|
||||||
new IconExtension(['/'], [['fill' => '', 'stroke' => '', 'fill-hover' => '', 'fill-group-hover' => '', 'stroke-group-hover' => '']]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsIfChildArrayDoesntContainFillGroupHoverKey(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\Exception::class);
|
|
||||||
new IconExtension(['/'], [['fill' => '', 'stroke' => '', 'fill-hover' => '', 'stroke-hover' => '', 'stroke-group-hover' => '']]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testThrowsIfChildArrayDoesntContainStrokeGroupHoverKey(): void
|
|
||||||
{
|
|
||||||
$this->expectException(\Exception::class);
|
|
||||||
new IconExtension(['/'], [['fill' => '', 'stroke' => '', 'fill-hover' => '', 'stroke-hover' => '', 'fill-group-hover' => '']]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testBlackStrokeAttributeValuesAreRemoved(): void
|
public function testBlackStrokeAttributeValuesAreRemoved(): void
|
||||||
{
|
{
|
||||||
$content = $this->icon->renderIcon(['icon' => self::ICON]);
|
$content = $this->icon->renderIcon(['icon' => self::ICON]);
|
||||||
|
|||||||
Reference in New Issue
Block a user