diff --git a/composer.json b/composer.json index 5e137a2..870e047 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.0", + "httpsoft/http-message": "^1.0", "phpmd/phpmd": "@stable", "phpunit/phpunit": "^9.0", "squizlabs/php_codesniffer": "^3.5", diff --git a/src/SvgInlineFontAwesome.php b/src/SvgInlineFontAwesome.php index b6efc6c..47e2887 100644 --- a/src/SvgInlineFontAwesome.php +++ b/src/SvgInlineFontAwesome.php @@ -42,11 +42,9 @@ public function __construct( Aliases $aliases, AssetManager $assetManager, ContainerInterface $container, - FontAwesomeIcon $icon, bool $registerAssets ) { parent::__construct($aliases, $container); - $this->icon = $icon; if ($registerAssets) { $assetManager->register([ diff --git a/tests/SvgInlineFontAwesomeTest.php b/tests/SvgInlineFontAwesomeTest.php index dfa84f6..a7fcd24 100644 --- a/tests/SvgInlineFontAwesomeTest.php +++ b/tests/SvgInlineFontAwesomeTest.php @@ -48,4 +48,12 @@ public function testWidth(): void { $this->assertStringContainsString('width="42" height="42"', $this->svgInline->fai('cookie')->width(42)); } + + public function testReset(): void + { + $firstRun = (string) $this->svgInline->fai('cookie')->class('yourClass'); + $secondRun = (string) $this->svgInline->fai('cookie'); + + $this->assertNotEquals($firstRun, $secondRun); + } }