From ec4a730b5331e265627e7407a47afa62971fe81d Mon Sep 17 00:00:00 2001 From: Brabli <67018167+Brabli@users.noreply.github.com> Date: Wed, 31 May 2023 11:39:16 +0100 Subject: [PATCH] Remove validation tests --- tests/Twig/Functions/IconExtensionTest.php | 62 ---------------------- 1 file changed, 62 deletions(-) diff --git a/tests/Twig/Functions/IconExtensionTest.php b/tests/Twig/Functions/IconExtensionTest.php index bcee566..337b1a0 100644 --- a/tests/Twig/Functions/IconExtensionTest.php +++ b/tests/Twig/Functions/IconExtensionTest.php @@ -32,9 +32,6 @@ class IconExtensionTest extends TestCase ] ]; - /** - * @var IconExtension - */ private IconExtension $icon; protected function setUp(): void @@ -42,11 +39,6 @@ class IconExtensionTest extends TestCase $this->icon = new IconExtension(['tests/icons'], self::COLOURS); } - public function testInstanceOf(): void - { - $this->assertInstanceOf(IconExtension::class, $this->icon); - } - public function testThrowsWhenPassedAnInvalidIconName(): void { $this->expectException(IconNotFound::class); @@ -151,60 +143,6 @@ class IconExtensionTest extends TestCase $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 { $content = $this->icon->renderIcon(['icon' => self::ICON]);