Skip to content

Commit

Permalink
added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
miqayelsrapionyan committed Aug 28, 2023
1 parent 772035a commit 40b02e7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Unit/Strategies/StrategyFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down

0 comments on commit 40b02e7

Please sign in to comment.