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
+
5
44
use App \Twig \TwigExtension ;
6
- use Twig \Environment ;
7
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
+ use Twig \Environment ;
8
50
9
51
class TwigExtensionTest extends TestCase
10
52
{
@@ -20,10 +62,10 @@ public function testApcaContrast(): void
20
62
$ awards = self ::getContainer ()->get (AwardService::class);
21
63
$ em = static ::getContainer ()->get (EntityManagerInterface::class);
22
64
$ tokenStorage = static ::getContainer ()->get (TokenStorageInterface::class);
23
- $ authorizationChecker = static ::getContainer ()->get (TokenStorageInterface ::class);
24
- $ router = static ::getContainer ()->get (TokenStorageInterface ::class);
65
+ $ authorizationChecker = static ::getContainer ()->get (AuthorizationCheckerInterface ::class);
66
+ $ router = static ::getContainer ()->get (RouterInterface ::class);
25
67
$ env = new Environment ();
26
- $ twigExt = new TwigExtension ($ dj , $ config , $ env $ em , $ submissionService ,
68
+ $ twigExt = new TwigExtension ($ dj , $ config , $ env, $ em , $ submissionService ,
27
69
$ eventLogService , $ awards , $ tokenStorage ,
28
70
$ authorizationChecker , $ router , "" );
29
71
self ::assertEquals (0.0 , $ twigExt ->apcaContrast ("#ffffff " , "#000000 " ));
0 commit comments