Skip to content

Commit

Permalink
testReset
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-42 committed Jan 4, 2021
1 parent 2ee3e7e commit e7ffd55
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions src/SvgInlineFontAwesome.php
Expand Up @@ -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([
Expand Down
8 changes: 8 additions & 0 deletions tests/SvgInlineFontAwesomeTest.php
Expand Up @@ -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);
}
}

0 comments on commit e7ffd55

Please sign in to comment.