Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolineus committed Jan 9, 2024
1 parent 8c2dc61 commit 20bf234
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 128 deletions.
4 changes: 2 additions & 2 deletions spec/Dca/Formatter/Value/DateFormatterSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace spec\Netzmacht\Contao\Toolkit\Dca\Formatter\Value;

use Contao\Config;
use Contao\CoreBundle\Framework\Adapter;
use Contao\Date;
use PhpSpec\ObjectBehavior;
use ReflectionClass;
Expand All @@ -24,13 +25,12 @@ class DateFormatterSpec extends ObjectBehavior
public function let(): void
{
$reflector = new ReflectionClass(Config::class);

Check failure on line 27 in spec/Dca/Formatter/Value/DateFormatterSpec.php

View workflow job for this annotation

GitHub Actions / PHP 8.1

Avoid unused local variables such as '$reflector'. (Ruleset: Unused Code Rules, https://phpmd.org/rules/unusedcode.html#unusedlocalvariable) (reported by phpmd_spec: UnusedLocalVariable)

Check failure on line 27 in spec/Dca/Formatter/Value/DateFormatterSpec.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

Avoid unused local variables such as '$reflector'. (Ruleset: Unused Code Rules, https://phpmd.org/rules/unusedcode.html#unusedlocalvariable) (reported by phpmd_spec: UnusedLocalVariable)
$config = $reflector->newInstanceWithoutConstructor();

$GLOBALS['TL_CONFIG']['dateFormat'] = self::DATE_FORMAT;
$GLOBALS['TL_CONFIG']['datimFormat'] = self::DATIM_FORMAT;
$GLOBALS['TL_CONFIG']['timeFormat'] = self::TIME_FORMAT;

$this->beConstructedWith($config);
$this->beConstructedWith(new Adapter(Config::class));
}

public function it_is_initializable(): void
Expand Down
126 changes: 0 additions & 126 deletions spec/View/Assets/AssetPackageAssetsManagerSpec.php

This file was deleted.

0 comments on commit 20bf234

Please sign in to comment.