From 40b02e70a0dba7f9423423242f5a043c59dba38a Mon Sep 17 00:00:00 2001 From: miqayelsrapionyan Date: Mon, 28 Aug 2023 14:54:35 +0400 Subject: [PATCH] added unit test --- tests/Unit/Strategies/StrategyFactoryTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Unit/Strategies/StrategyFactoryTest.php b/tests/Unit/Strategies/StrategyFactoryTest.php index c338dd8..6a8fa07 100644 --- a/tests/Unit/Strategies/StrategyFactoryTest.php +++ b/tests/Unit/Strategies/StrategyFactoryTest.php @@ -5,6 +5,7 @@ namespace CssGenerator\Tests\Unit\Strategies; use CssGenerator\Strategies\BackgroundStrategy; +use CssGenerator\Strategies\BoxShadowStrategy; use CssGenerator\Strategies\DefaultStrategy; use CssGenerator\Strategies\FilterStrategy; use CssGenerator\StrategyFactory; @@ -28,6 +29,14 @@ public function testCreate_WhenGivenBackgroundAsArgument_ReturnsBackgroundStrate $this->assertEquals($expected, $actual); } + public function testCreate_WhenGivenBoxShadowAsArgument_ReturnsBoxShadowInstance(): void + { + $expected = new BoxShadowStrategy(); + $actual = StrategyFactory::create('box-shadow'); + + $this->assertEquals($expected, $actual); + } + public function testCreate_WhenGivenOtherValueAsArgument_ReturnsDefaultStrategyInstance(): void { $expected = new DefaultStrategy();