2
2
3
3
namespace App \Tests \Unit \Twig ;
4
4
5
- /*use App\Entity\BaseApiEntity;
6
- use App\Entity\Contest;
7
- use App\Entity\ContestProblem;
8
- use App\Entity\ExternalJudgement;
9
- use App\Entity\ExternalRun;
10
- use App\Entity\ExternalSourceWarning;
11
- use App\Entity\HasExternalIdInterface;
12
- use App\Entity\Judging;
13
- use App\Entity\JudgingRun;
14
- use App\Entity\Problem;
15
- use App\Entity\Submission;
16
- use App\Entity\SubmissionFile;
17
- use App\Entity\Team;
18
- use App\Entity\TeamCategory;
19
- use App\Entity\Testcase;*/
20
- use App \Service \AwardService ;
21
- use App \Service \ConfigurationService ;
22
- use App \Service \DOMJudgeService ;
23
- use App \Service \EventLogService ;
24
- use App \Service \SubmissionService ;
25
- /*use App\Utils\Scoreboard\ScoreboardMatrixItem;
26
- use App\Utils\Scoreboard\TeamScore;
27
- use App\Utils\Utils;
28
- use Doctrine\Common\Collections\Collection;*/
29
- use Doctrine \ORM \EntityManagerInterface ;
30
- /*use Symfony\Component\DependencyInjection\Attribute\Autowire;
31
- use Symfony\Component\Intl\Countries;
32
- use Symfony\Component\Intl\Exception\MissingResourceException;
33
- use Symfony\Component\PropertyAccess\PropertyAccess;*/
34
- use Symfony \Component \Routing \RouterInterface ;
35
- use Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface ;
36
- use Symfony \Component \Security \Core \Authorization \AuthorizationCheckerInterface ;
37
- /*use Twig\Environment;
38
- use Twig\Extension\AbstractExtension;
39
- use Twig\Extension\GlobalsInterface;
40
- use Twig\Runtime\EscaperRuntime;
41
- use Twig\TwigFilter;
42
- use Twig\TwigFunction;*/
43
-
44
5
use App \Twig \TwigExtension ;
45
- use PHPUnit \Framework \TestCase ;
46
- /*use Symfony\Component\Routing\RouterInterface;
47
- use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
48
- use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;*/
49
6
use Twig \Environment ;
7
+ use PHPUnit \Framework \TestCase ;
50
8
51
9
class TwigExtensionTest extends TestCase
52
10
{
@@ -62,10 +20,10 @@ public function testApcaContrast(): void
62
20
$ awards = self ::getContainer ()->get (AwardService::class);
63
21
$ em = static ::getContainer ()->get (EntityManagerInterface::class);
64
22
$ tokenStorage = static ::getContainer ()->get (TokenStorageInterface::class);
65
- $ authorizationChecker = static ::getContainer ()->get (AuthorizationCheckerInterface ::class);
66
- $ router = static ::getContainer ()->get (RouterInterface ::class);
23
+ $ authorizationChecker = static ::getContainer ()->get (TokenStorageInterface ::class);
24
+ $ router = static ::getContainer ()->get (TokenStorageInterface ::class);
67
25
$ env = new Environment ();
68
- $ twigExt = new TwigExtension ($ dj , $ config , $ env, $ em , $ submissionService ,
26
+ $ twigExt = new TwigExtension ($ dj , $ config , $ env $ em , $ submissionService ,
69
27
$ eventLogService , $ awards , $ tokenStorage ,
70
28
$ authorizationChecker , $ router , "" );
71
29
self ::assertEquals (0.0 , $ twigExt ->apcaContrast ("#ffffff " , "#000000 " ));
0 commit comments