Skip to content

Add functional tests for all actions #1706

Add functional tests for all actions

Add functional tests for all actions #1706

Triggered via pull request March 10, 2024 16:51
Status Failure
Total duration 50s
Artifacts

continuous-integration.yml

on: pull_request
run  /  Generate test matrix
3s
run / Generate test matrix
Matrix: run / Code Coverage
Matrix: run / Coding Standards
Matrix: run / Lint composer.json
Matrix: run / Lint symfony container
Matrix: run / Mutation Tests
Matrix: run / Static Code Analysis
Matrix: run / Lint twig files
Matrix: run / Lint XLIFF files
Matrix: run / Lint YML files
Matrix: run / tests
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 27 warnings
run / Static Code Analysis (8.3): tests/Functional/Action/EditProfileWebTest.php#L46
Cannot call method getLocale() on Nucleos\ProfileBundle\Tests\App\Entity\TestUser|null.
run / Static Code Analysis (8.3)
Process completed with exit code 2.
run / Coding Standards (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint symfony container (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint composer.json (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint YML files (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Static Code Analysis (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Code Coverage (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint twig files (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint XLIFF files (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.2, Symfony 7.0, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.3, Symfony 6.4, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.2, Symfony 7.0, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.2, Symfony 6.4, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.3, Symfony 6.4, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.3, Symfony 7.0, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.2, Symfony 6.4, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.3, Symfony 7.0, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Mutation Tests (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Mutation Tests (8.3): src/Action/EditProfileAction.php#L67
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ public function __invoke(Request $request) : Response { $user = $this->security->getUser(); - if (!$user instanceof UserInterface) { + if (!true) { throw new AccessDeniedException('This user does not have access to this section.'); } $event = new GetResponseUserEvent($user, $request);
run / Mutation Tests (8.3): src/Action/EditProfileAction.php#L72
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ throw new AccessDeniedException('This user does not have access to this section.'); } $event = new GetResponseUserEvent($user, $request); - $this->eventDispatcher->dispatch($event, NucleosProfileEvents::PROFILE_EDIT_INITIALIZE); + if (null !== $event->getResponse()) { return $event->getResponse(); }
run / Mutation Tests (8.3): src/Action/EditProfileAction.php#L93
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ private function updateUser(Request $request, FormInterface $form, UserInterface $user) : Response { $event = new UserFormEvent($user, $form, $request); - $this->eventDispatcher->dispatch($event, NucleosProfileEvents::PROFILE_EDIT_SUCCESS); + $this->userManager->updateUser($user); if (null === ($response = $event->getResponse())) { $response = new RedirectResponse($this->router->generate('nucleos_profile_profile_show'));
run / Mutation Tests (8.3): src/Action/EditProfileAction.php#L101
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ if (null === ($response = $event->getResponse())) { $response = new RedirectResponse($this->router->generate('nucleos_profile_profile_show')); } - $this->eventDispatcher->dispatch(new FilterUserResponseEvent($user, $request, $response), NucleosProfileEvents::PROFILE_EDIT_COMPLETED); + return $response; } private function createForm(UserInterface $user) : FormInterface
run / Mutation Tests (8.3): src/Action/EditProfileAction.php#L112
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ } private function createForm(UserInterface $user) : FormInterface { - return $this->formFactory->create(ProfileFormType::class, $user, ['validation_groups' => ['Profile', 'User', 'Default']])->add('save', SubmitType::class, ['label' => 'profile.edit.submit']); + return $this->formFactory->create(ProfileFormType::class, $user, [])->add('save', SubmitType::class, ['label' => 'profile.edit.submit']); } }
run / Mutation Tests (8.3): src/Action/EditProfileAction.php#L113
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ } private function createForm(UserInterface $user) : FormInterface { - return $this->formFactory->create(ProfileFormType::class, $user, ['validation_groups' => ['Profile', 'User', 'Default']])->add('save', SubmitType::class, ['label' => 'profile.edit.submit']); + return $this->formFactory->create(ProfileFormType::class, $user, ['validation_groups' => ['User', 'Default']])->add('save', SubmitType::class, ['label' => 'profile.edit.submit']); } }
run / Mutation Tests (8.3): src/Action/EditProfileAction.php#L115
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ } private function createForm(UserInterface $user) : FormInterface { - return $this->formFactory->create(ProfileFormType::class, $user, ['validation_groups' => ['Profile', 'User', 'Default']])->add('save', SubmitType::class, ['label' => 'profile.edit.submit']); + return $this->formFactory->create(ProfileFormType::class, $user, ['validation_groups' => ['Profile', 'User', 'Default']])->add('save', SubmitType::class, []); } }
run / Mutation Tests (8.3): src/Action/RegistrationAction.php#L63
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { $user = $this->userManager->createUser(); $event = new GetResponseRegistrationEvent($user, $request); - $this->eventDispatcher->dispatch($event, NucleosProfileEvents::REGISTRATION_INITIALIZE); + if (null !== $event->getResponse()) { return $event->getResponse(); }
run / Mutation Tests (8.3): src/Action/RegistrationAction.php#L70
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ return $event->getResponse(); } $form = $this->createForm($user); - $form->handleRequest($request); + if ($form->isSubmitted()) { if ($form->isValid()) { return $this->updateUser($request, $user, $form);
run / Mutation Tests (8.3): src/Action/RegistrationAction.php#L112
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ } private function createForm(UserInterface $user) : FormInterface { - return $this->formFactory->create(RegistrationFormType::class, $user, ['validation_groups' => ['Registration', 'User', 'Default']])->add('save', SubmitType::class, ['label' => 'registration.submit']); + return $this->formFactory->create(RegistrationFormType::class, $user, [])->add('save', SubmitType::class, ['label' => 'registration.submit']); } }