From 5e92393aafa0d3362a9ae65b3a52ae492a1348c7 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Thu, 19 Sep 2019 23:26:21 +0200 Subject: [PATCH] Deleted bad failing test --- .../CreateSourceActionIntegrationTest.php | 110 ------------------ 1 file changed, 110 deletions(-) delete mode 100644 application/symfony/tests/Integration/Domain/Action/Create/CreateSourceActionIntegrationTest.php diff --git a/application/symfony/tests/Integration/Domain/Action/Create/CreateSourceActionIntegrationTest.php b/application/symfony/tests/Integration/Domain/Action/Create/CreateSourceActionIntegrationTest.php deleted file mode 100644 index 6f5f108..0000000 --- a/application/symfony/tests/Integration/Domain/Action/Create/CreateSourceActionIntegrationTest.php +++ /dev/null @@ -1,110 +0,0 @@ -get('security.csrf.token_manager')->getToken('authenticate')->getValue(); - $this->formFactory = self::$container->get('form.factory'); - $entityManager = static::$kernel->getContainer() - ->get('doctrine') - ->getManager(); - $security = self::$container->get(Security::class); - //$security = $this->createMock(Security::class); - $userSourceDirectorService = new UserSourceDirectorService($entityManager, $security); - $requestedEntityService = new RequestedEntityService(); - $requestedRightService = new RequestedRightService($requestedEntityService); - $requestedUserService = new RequestedUserService($userSourceDirectorService, $requestedRightService); - $this->requestedActionService = new RequestedActionService($requestedUserService); - $this->requestedActionService->setActionType(ActionType::CREATE); - $formClassNameService = new FormClassNameService(); - $requestedActionFormBuilderService = new RequestedActionFormBuilderService($this->formFactory, $formClassNameService, $this->requestedActionService); - $this->request = new Request(); - $this->request->request->set('_token', $csrfToken); - $this->requestStack = new RequestStack(); - $this->requestStack->push($this->request); - $layerRepositoryFactoryService = new LayerRepositoryFactoryService($entityManager); - $rightTransformerService = new RightTransformerService(); - $secureRequestedRightChecker = new SecureRequestedRightCheckerService($rightTransformerService); - $this->actionService = new ActionDependenciesDAOService($this->requestedActionService, $secureRequestedRightChecker, $this->requestStack, $layerRepositoryFactoryService, $requestedActionFormBuilderService, $entityManager); - $this->createSourceAction = new CreateSourceAction($this->actionService); - } - - public function testPreconditions(): void - { - $this->assertEquals($this->request, $this->requestStack->getCurrentRequest()); - } - - public function testCreateWithGuestUser(): void - { - $this->request->setMethod(Request::METHOD_POST); - $this->request->request->set(ClassAttributInterface::CLASS_ATTRIBUT_NAME, PureSource::class); - $this->assertInstanceOf(PureSourceInterface::class, $this->createSourceAction->execute()); - } - - // @todo Implement the following function - // public function testCreatedWithKnownUser(): void - // {} -}