diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index d21ab6f..829f50f 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":1,"defects":{"Tests\\Controller\\DefaultControllerTest::testIndex":4,"App\\Tests\\AppTest::testTestsAreworking":5,"App\\Tests\\TaskTest::testSomething":3,"App\\Tests\\TaskTest::testCanCreateNewTask":5,"Tests\\Controller\\TaskControllerTest::testCanCreateNewTask":5,"Tests\\Controller\\TaskControllerTest::testCanReadTasksList":3,"App\\Tests\\Controller\\TaskControllerTest::testCanReadTasksList":2,"App\\Tests\\Controller\\TaskControllerTest::testCanAccessTaskCreationPage":4,"App\\Tests\\Controller\\TaskControllerTest::testCanCreateNewTask":1,"App\\Tests\\Unit\\Entity\\TaskTest::testItWorks":5,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitle":5,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveADescription":2,"App\\Tests\\Unit\\Entity\\TaskTest::testCanGetAndSetData":4,"App\\Tests\\Unit\\Entity\\TaskTest::testCanToggleATask":4,"Error":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #0":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #1":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #2":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #3":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #4":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #5":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #6":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #7":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #8":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #9":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #10":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #11":3,"App\\Tests\\Unit\\Entity\\TaskTest::testATaskShouldHaveAnAuthor":2,"App\\Tests\\Unit\\Entity\\TaskTest::testDefaultTasksShouldBeAssignedToAnonymousUser":2,"App\\Tests\\Controller\\TaskControllerTest::testOnlyAdminUserCanDeleteDefaultTasks":2,"App\\Tests\\Controller\\TaskControllerTest::testTaskCanBeEditedByItsAuthor":4,"App\\Tests\\Controller\\TaskControllerTest::testCannotEditATaskOfWhichUserIsNotTheAuthor":3,"App\\Tests\\Controller\\TaskControllerTest::testCanToggleATask":2,"App\\Tests\\Controller\\TaskControllerTest::testCanDeleteATask":2,"App\\Tests\\Controller\\SecurityControllerTest::testLogin":5,"App\\Tests\\Controller\\SecurityControllerTest::testLogout":1,"App\\Tests\\Controller\\UserControllerTest::testOnlyAdminUsersCanAccessUsersListPage":4,"App\\Tests\\Controller\\UserControllerTest::testAnonymousUserCannotAccessUsersListPage":4,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotAccessUsersListPage":4,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanCreateNewUser":4,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotCreateNewUser":4,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanEditAnotherUser":5,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanPromoteAnotherUser":2,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanDemoteAnotherUser":2,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotEditAnotherUser":2,"App\\Tests\\Controller\\TaskControllerTest::testUserCanCreateNewTask":4,"App\\Tests\\Controller\\TaskControllerTest::testTaskAuthorIsSetToCurrentUserWhenCreated":1,"App\\Tests\\Controller\\TaskControllerTest::testCannotEditTaskAuthor":4,"App\\Tests\\Controller\\TaskControllerTest::testAuthorCanDeleteTheirOwnTask":4,"App\\Tests\\Controller\\TaskControllerTest::testCannotDeleteTaskOfWhichUserIsNotTheAuthor":4,"App\\Tests\\Controller\\UserControllerTest::testCanAccessUsersListPage":3,"App\\Tests\\Controller\\UserControllerTest::testCannotAccessUsersListPageAnonymously":3,"App\\Tests\\Controller\\SecurityControllerTest::testCannotLoginWithInvalidCredentials":5,"App\\Tests\\Controller\\DefaultControllerTest::testVisitingWhileLoggedIn":5,"App\\Tests\\Controller\\SecurityControllerTest::testUserCanLoginViaForm":5,"App\\Tests\\Controller\\SecurityControllerTest::testAnyoneCanAccessLoginForm":5,"App\\Tests\\Controller\\TaskControllerTest::testUserCanReadTasksList":4,"App\\Tests\\Controller\\TaskControllerTest::testCannoReadTasksListAnonymously":2,"App\\Tests\\Controller\\TaskControllerTest::testCannotCreateTaskAnonymously":4,"App\\Tests\\Controller\\TaskControllerTest::testLoggedInUsersCanAccessTaskCreationPage":4,"App\\Tests\\Controller\\TaskControllerTest::testCannotAccessTasksListAnonymously":4,"App\\Tests\\Controller\\TaskControllerTest::testUserCanToggleATask":4,"App\\Tests\\Controller\\TaskControllerTest::testUserCanAccessTaskListViaALink":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription":2,"App\\Tests\\Entity\\TaskTest::testATaskShouldHaveAnAuthor":4,"App\\Tests\\Entity\\TaskTest::testDefaultTasksShouldBeAssignedToAnonymousUser":2,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #0":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #1":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #2":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #3":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #0":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #1":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #2":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #3":4,"App\\Tests\\Entity\\TaskTest::testCannotCreateTaskWithoutAuthor":3,"App\\Tests\\Controller\\DefaultControllerTest::testIndex":5,"App\\Tests\\Entity\\TaskTest::testItWorks":6,"App\\Tests\\Entity\\TaskTest::testCanGetAndSetData":4,"App\\Tests\\Entity\\TaskTest::testCanToggleATask":4,"App\\Tests\\AppTest::testTestsAreWorking":6,"App\\Tests\\Entity\\TaskTest::testTaskAuthorIsSetToCurrentUserWhenCreated":4,"App\\Tests\\Entity\\UserTest::testCanGetAndSetData":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #0":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #1":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #2":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #3":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #4":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #5":4,"App\\Tests\\Controller\\TaskControllerTest::testAdminUserCanDeleteDefaultTasks":4,"App\\Tests\\Controller\\TaskControllerTest::testAuthorCanAccessTaskEditForm":4,"App\\Tests\\Controller\\TaskControllerTest::testTaskCanBeEdited":4},"times":{"Tests\\Controller\\DefaultControllerTest::testIndex":0.351,"App\\Tests\\AppTest::testTestsAreworking":0,"App\\Tests\\TaskTest::testSomething":0.067,"App\\Tests\\TaskTest::testCanCreateNewTask":0.264,"App\\Tests\\TaskControllerTest::testCanCreateNewTask":0.274,"Tests\\Controller\\TaskControllerTest::testCanCreateNewTask":0.275,"Tests\\Controller\\TaskControllerTest::testCanAccessTaskCreationPage":0.045,"Tests\\Controller\\TaskControllerTest::testCanReadTasksList":0.687,"App\\Tests\\AppTest::testTestsAreWorking":0.004,"App\\Tests\\Controller\\DefaultControllerTest::testIndex":0.21,"App\\Tests\\Controller\\TaskControllerTest::testCanReadTasksList":0.075,"App\\Tests\\Controller\\TaskControllerTest::testCanAccessTaskCreationPage":0.151,"App\\Tests\\Controller\\TaskControllerTest::testCanCreateNewTask":0.002,"App\\Tests\\Unit\\Entity\\TaskTest::testItWorks":0,"App\\Tests\\Unit\\Entity\\TaskTest::testCanGetAndSetData":0,"App\\Tests\\Unit\\Entity\\TaskTest::testCanToggleATask":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitle":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveADescription":0,"Error":0.004,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #0":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #1":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #2":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #3":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #0":0.002,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #1":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #2":0.003,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #3":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #4":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #5":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #6":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #7":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #8":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #9":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #10":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #11":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testATaskShouldHaveAnAuthor":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testDefaultTasksShouldBeAssignedToAnonymousUser":0.001,"App\\Tests\\Controller\\TaskControllerTest::testOnlyAdminUserCanDeleteDefaultTasks":0.004,"App\\Tests\\Controller\\TaskControllerTest::testTaskCanBeEditedByItsAuthor":1.197,"App\\Tests\\Controller\\TaskControllerTest::testCannotEditATaskOfWhichUserIsNotTheAuthor":0.142,"App\\Tests\\Controller\\TaskControllerTest::testCanToggleATask":0,"App\\Tests\\Controller\\TaskControllerTest::testCanDeleteATask":0.001,"App\\Tests\\Controller\\SecurityControllerTest::testLogin":0.197,"App\\Tests\\Controller\\SecurityControllerTest::testLogout":0.008,"App\\Tests\\Controller\\UserControllerTest::testCanAccessUsersListPage":0.419,"App\\Tests\\Controller\\UserControllerTest::testOnlyAdminUsersCanAccessUsersListPage":0.371,"App\\Tests\\Controller\\UserControllerTest::testAnonymousUserCannotAccessUsersListPage":0.162,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotAccessUsersListPage":1.387,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanCreateNewUser":2.132,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotCreateNewUser":1.622,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanEditAnotherUser":1.633,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanPromoteAnotherUser":0.004,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanDemoteAnotherUser":0.01,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotEditAnotherUser":0.004,"App\\Tests\\Controller\\TaskControllerTest::testUserCanCreateNewTask":2.256,"App\\Tests\\Controller\\TaskControllerTest::testTaskAuthorIsSetToCurrentUserWhenCreated":0.002,"App\\Tests\\Controller\\TaskControllerTest::testCannotEditTaskAuthor":2,"App\\Tests\\Controller\\TaskControllerTest::testAuthorCanDeleteTheirOwnTask":3.424,"App\\Tests\\Controller\\TaskControllerTest::testCannotDeleteTaskOfWhichUserIsNotTheAuthor":2.123,"App\\Tests\\Controller\\UserControllerTest::testCannotAccessUsersListPageAnonymously":0.064,"App\\Tests\\Controller\\SecurityControllerTest::testAnyoneCanAccessLoginForm":0.203,"App\\Tests\\Controller\\SecurityControllerTest::testCannotLoginWithInvalidCredentials":0.518,"App\\Tests\\Controller\\DefaultControllerTest::testVisitingWhileLoggedIn":0.291,"App\\Tests\\Controller\\SecurityControllerTest::testUserCanLoginViaForm":0.462,"App\\Tests\\Controller\\TaskControllerTest::testUserCanReadTasksList":1.665,"App\\Tests\\Controller\\TaskControllerTest::testCannoReadTasksListAnonymously":0.001,"App\\Tests\\Controller\\TaskControllerTest::testCannotCreateTaskAnonymously":0.328,"App\\Tests\\Controller\\TaskControllerTest::testLoggedInUsersCanAccessTaskCreationPage":0.474,"App\\Tests\\Controller\\TaskControllerTest::testCannotAccessTasksListAnonymously":0.167,"App\\Tests\\Controller\\TaskControllerTest::testUserCanToggleATask":0.227,"App\\Tests\\Controller\\TaskControllerTest::testUserCanAccessTaskListViaALink":1.103,"App\\Tests\\Entity\\TaskTest::testItWorks":0.004,"App\\Tests\\Entity\\TaskTest::testCanGetAndSetData":0.002,"App\\Tests\\Entity\\TaskTest::testCanToggleATask":0.002,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #0":0.082,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #1":0.093,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #2":0.075,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #3":0.073,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription":0.001,"App\\Tests\\Entity\\TaskTest::testATaskShouldHaveAnAuthor":0.335,"App\\Tests\\Entity\\TaskTest::testDefaultTasksShouldBeAssignedToAnonymousUser":0.001,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #0":0.078,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #1":0.083,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #2":0.122,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #3":0.086,"App\\Tests\\Entity\\TaskTest::testCannotCreateTaskWithoutAuthor":0.321,"App\\Tests\\Entity\\TaskTest::testTaskAuthorIsSetToCurrentUserWhenCreated":0.058,"App\\Tests\\Entity\\UserTest::testItWorks":0.001,"App\\Tests\\Entity\\UserTest::testCanGetAndSetData":0.185,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #0":0.355,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #1":0.313,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #2":0.313,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #3":0.24,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #4":0.298,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #5":0.316,"App\\Tests\\Controller\\TaskControllerTest::testAdminUserCanDeleteDefaultTasks":0.303,"App\\Tests\\Controller\\TaskControllerTest::testAuthorCanAccessTaskEditForm":3.883,"App\\Tests\\Controller\\TaskControllerTest::testTaskCanBeEdited":1.819}} \ No newline at end of file +{"version":1,"defects":{"Tests\\Controller\\DefaultControllerTest::testIndex":4,"App\\Tests\\AppTest::testTestsAreworking":5,"App\\Tests\\TaskTest::testSomething":3,"App\\Tests\\TaskTest::testCanCreateNewTask":5,"Tests\\Controller\\TaskControllerTest::testCanCreateNewTask":5,"Tests\\Controller\\TaskControllerTest::testCanReadTasksList":3,"App\\Tests\\Controller\\TaskControllerTest::testCanReadTasksList":2,"App\\Tests\\Controller\\TaskControllerTest::testCanAccessTaskCreationPage":4,"App\\Tests\\Controller\\TaskControllerTest::testCanCreateNewTask":1,"App\\Tests\\Unit\\Entity\\TaskTest::testItWorks":5,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitle":5,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveADescription":2,"App\\Tests\\Unit\\Entity\\TaskTest::testCanGetAndSetData":4,"App\\Tests\\Unit\\Entity\\TaskTest::testCanToggleATask":4,"Error":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #0":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #1":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #2":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #3":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #4":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #5":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #6":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #7":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #8":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #9":4,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #10":3,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #11":3,"App\\Tests\\Unit\\Entity\\TaskTest::testATaskShouldHaveAnAuthor":2,"App\\Tests\\Unit\\Entity\\TaskTest::testDefaultTasksShouldBeAssignedToAnonymousUser":2,"App\\Tests\\Controller\\TaskControllerTest::testOnlyAdminUserCanDeleteDefaultTasks":2,"App\\Tests\\Controller\\TaskControllerTest::testTaskCanBeEditedByItsAuthor":4,"App\\Tests\\Controller\\TaskControllerTest::testCannotEditATaskOfWhichUserIsNotTheAuthor":3,"App\\Tests\\Controller\\TaskControllerTest::testCanToggleATask":2,"App\\Tests\\Controller\\TaskControllerTest::testCanDeleteATask":2,"App\\Tests\\Controller\\SecurityControllerTest::testLogin":5,"App\\Tests\\Controller\\SecurityControllerTest::testLogout":1,"App\\Tests\\Controller\\UserControllerTest::testOnlyAdminUsersCanAccessUsersListPage":4,"App\\Tests\\Controller\\UserControllerTest::testAnonymousUserCannotAccessUsersListPage":4,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotAccessUsersListPage":4,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanCreateNewUser":4,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotCreateNewUser":4,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanEditAnotherUser":5,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanPromoteAnotherUser":3,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanDemoteAnotherUser":2,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotEditAnotherUser":3,"App\\Tests\\Controller\\TaskControllerTest::testUserCanCreateNewTask":4,"App\\Tests\\Controller\\TaskControllerTest::testTaskAuthorIsSetToCurrentUserWhenCreated":1,"App\\Tests\\Controller\\TaskControllerTest::testCannotEditTaskAuthor":4,"App\\Tests\\Controller\\TaskControllerTest::testAuthorCanDeleteTheirOwnTask":4,"App\\Tests\\Controller\\TaskControllerTest::testCannotDeleteTaskOfWhichUserIsNotTheAuthor":4,"App\\Tests\\Controller\\UserControllerTest::testCanAccessUsersListPage":3,"App\\Tests\\Controller\\UserControllerTest::testCannotAccessUsersListPageAnonymously":3,"App\\Tests\\Controller\\SecurityControllerTest::testCannotLoginWithInvalidCredentials":5,"App\\Tests\\Controller\\DefaultControllerTest::testVisitingWhileLoggedIn":5,"App\\Tests\\Controller\\SecurityControllerTest::testUserCanLoginViaForm":5,"App\\Tests\\Controller\\SecurityControllerTest::testAnyoneCanAccessLoginForm":5,"App\\Tests\\Controller\\TaskControllerTest::testUserCanReadTasksList":4,"App\\Tests\\Controller\\TaskControllerTest::testCannoReadTasksListAnonymously":2,"App\\Tests\\Controller\\TaskControllerTest::testCannotCreateTaskAnonymously":4,"App\\Tests\\Controller\\TaskControllerTest::testLoggedInUsersCanAccessTaskCreationPage":4,"App\\Tests\\Controller\\TaskControllerTest::testCannotAccessTasksListAnonymously":4,"App\\Tests\\Controller\\TaskControllerTest::testUserCanToggleATask":4,"App\\Tests\\Controller\\TaskControllerTest::testUserCanAccessTaskListViaALink":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription":2,"App\\Tests\\Entity\\TaskTest::testATaskShouldHaveAnAuthor":4,"App\\Tests\\Entity\\TaskTest::testDefaultTasksShouldBeAssignedToAnonymousUser":2,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #0":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #1":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #2":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #3":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #0":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #1":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #2":4,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #3":4,"App\\Tests\\Entity\\TaskTest::testCannotCreateTaskWithoutAuthor":3,"App\\Tests\\Controller\\DefaultControllerTest::testIndex":5,"App\\Tests\\Entity\\TaskTest::testItWorks":6,"App\\Tests\\Entity\\TaskTest::testCanGetAndSetData":4,"App\\Tests\\Entity\\TaskTest::testCanToggleATask":4,"App\\Tests\\AppTest::testTestsAreWorking":6,"App\\Tests\\Entity\\TaskTest::testTaskAuthorIsSetToCurrentUserWhenCreated":4,"App\\Tests\\Entity\\UserTest::testCanGetAndSetData":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #0":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #1":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #2":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #3":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #4":4,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #5":4,"App\\Tests\\Controller\\TaskControllerTest::testAdminUserCanDeleteDefaultTasks":4,"App\\Tests\\Controller\\TaskControllerTest::testAuthorCanAccessTaskEditForm":4,"App\\Tests\\Controller\\TaskControllerTest::testTaskCanBeEdited":4},"times":{"Tests\\Controller\\DefaultControllerTest::testIndex":0.351,"App\\Tests\\AppTest::testTestsAreworking":0,"App\\Tests\\TaskTest::testSomething":0.067,"App\\Tests\\TaskTest::testCanCreateNewTask":0.264,"App\\Tests\\TaskControllerTest::testCanCreateNewTask":0.274,"Tests\\Controller\\TaskControllerTest::testCanCreateNewTask":0.275,"Tests\\Controller\\TaskControllerTest::testCanAccessTaskCreationPage":0.045,"Tests\\Controller\\TaskControllerTest::testCanReadTasksList":0.687,"App\\Tests\\AppTest::testTestsAreWorking":0.001,"App\\Tests\\Controller\\DefaultControllerTest::testIndex":0.131,"App\\Tests\\Controller\\TaskControllerTest::testCanReadTasksList":0.075,"App\\Tests\\Controller\\TaskControllerTest::testCanAccessTaskCreationPage":0.151,"App\\Tests\\Controller\\TaskControllerTest::testCanCreateNewTask":0.002,"App\\Tests\\Unit\\Entity\\TaskTest::testItWorks":0,"App\\Tests\\Unit\\Entity\\TaskTest::testCanGetAndSetData":0,"App\\Tests\\Unit\\Entity\\TaskTest::testCanToggleATask":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitle":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveADescription":0,"Error":0.004,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #0":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #1":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #2":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #3":0,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #0":0.002,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #1":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #2":0.003,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #3":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #4":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #5":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #6":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #7":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #8":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #9":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #10":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testTaskShouldHaveAValidTitle with data set #11":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testATaskShouldHaveAnAuthor":0.001,"App\\Tests\\Unit\\Entity\\TaskTest::testDefaultTasksShouldBeAssignedToAnonymousUser":0.001,"App\\Tests\\Controller\\TaskControllerTest::testOnlyAdminUserCanDeleteDefaultTasks":0.004,"App\\Tests\\Controller\\TaskControllerTest::testTaskCanBeEditedByItsAuthor":1.197,"App\\Tests\\Controller\\TaskControllerTest::testCannotEditATaskOfWhichUserIsNotTheAuthor":0.142,"App\\Tests\\Controller\\TaskControllerTest::testCanToggleATask":0,"App\\Tests\\Controller\\TaskControllerTest::testCanDeleteATask":0.001,"App\\Tests\\Controller\\SecurityControllerTest::testLogin":0.159,"App\\Tests\\Controller\\SecurityControllerTest::testLogout":0.006,"App\\Tests\\Controller\\UserControllerTest::testCanAccessUsersListPage":0.419,"App\\Tests\\Controller\\UserControllerTest::testOnlyAdminUsersCanAccessUsersListPage":0.225,"App\\Tests\\Controller\\UserControllerTest::testAnonymousUserCannotAccessUsersListPage":0.145,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotAccessUsersListPage":1.286,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanCreateNewUser":1.813,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotCreateNewUser":1.381,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanEditAnotherUser":1.212,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanPromoteAnotherUser":1.646,"App\\Tests\\Controller\\UserControllerTest::testAdminUserCanDemoteAnotherUser":1.391,"App\\Tests\\Controller\\UserControllerTest::testNonAdminUserCannotEditAnotherUser":1.386,"App\\Tests\\Controller\\TaskControllerTest::testUserCanCreateNewTask":1.956,"App\\Tests\\Controller\\TaskControllerTest::testTaskAuthorIsSetToCurrentUserWhenCreated":0.002,"App\\Tests\\Controller\\TaskControllerTest::testCannotEditTaskAuthor":1.344,"App\\Tests\\Controller\\TaskControllerTest::testAuthorCanDeleteTheirOwnTask":0.21,"App\\Tests\\Controller\\TaskControllerTest::testCannotDeleteTaskOfWhichUserIsNotTheAuthor":1.268,"App\\Tests\\Controller\\UserControllerTest::testCannotAccessUsersListPageAnonymously":0.064,"App\\Tests\\Controller\\SecurityControllerTest::testAnyoneCanAccessLoginForm":0.13,"App\\Tests\\Controller\\SecurityControllerTest::testCannotLoginWithInvalidCredentials":0.399,"App\\Tests\\Controller\\DefaultControllerTest::testVisitingWhileLoggedIn":0.168,"App\\Tests\\Controller\\SecurityControllerTest::testUserCanLoginViaForm":0.304,"App\\Tests\\Controller\\TaskControllerTest::testUserCanReadTasksList":0.588,"App\\Tests\\Controller\\TaskControllerTest::testCannoReadTasksListAnonymously":0.001,"App\\Tests\\Controller\\TaskControllerTest::testCannotCreateTaskAnonymously":0.299,"App\\Tests\\Controller\\TaskControllerTest::testLoggedInUsersCanAccessTaskCreationPage":0.87,"App\\Tests\\Controller\\TaskControllerTest::testCannotAccessTasksListAnonymously":2.686,"App\\Tests\\Controller\\TaskControllerTest::testUserCanToggleATask":0.227,"App\\Tests\\Controller\\TaskControllerTest::testUserCanAccessTaskListViaALink":0.668,"App\\Tests\\Entity\\TaskTest::testItWorks":0.001,"App\\Tests\\Entity\\TaskTest::testCanGetAndSetData":0.002,"App\\Tests\\Entity\\TaskTest::testCanToggleATask":0.002,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #0":0.053,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #1":0.074,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #2":0.049,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveATitleString with data set #3":0.062,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription":0.001,"App\\Tests\\Entity\\TaskTest::testATaskShouldHaveAnAuthor":0.255,"App\\Tests\\Entity\\TaskTest::testDefaultTasksShouldBeAssignedToAnonymousUser":0.001,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #0":0.051,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #1":0.051,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #2":0.054,"App\\Tests\\Entity\\TaskTest::testTaskShouldHaveADescription with data set #3":0.081,"App\\Tests\\Entity\\TaskTest::testCannotCreateTaskWithoutAuthor":0.185,"App\\Tests\\Entity\\TaskTest::testTaskAuthorIsSetToCurrentUserWhenCreated":0.058,"App\\Tests\\Entity\\UserTest::testItWorks":0.002,"App\\Tests\\Entity\\UserTest::testCanGetAndSetData":0.121,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #0":0.213,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #1":0.202,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #2":0.176,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #3":0.171,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #4":0.195,"App\\Tests\\Entity\\UserTest::testEmailValidation with data set #5":0.219,"App\\Tests\\Controller\\TaskControllerTest::testAdminUserCanDeleteDefaultTasks":0.261,"App\\Tests\\Controller\\TaskControllerTest::testAuthorCanAccessTaskEditForm":0.333,"App\\Tests\\Controller\\TaskControllerTest::testTaskCanBeEdited":1.551}} \ No newline at end of file diff --git a/clover.xml b/clover.xml index 7a7f93e..a4dd4da 100644 --- a/clover.xml +++ b/clover.xml @@ -1,6 +1,6 @@ - - + + @@ -58,7 +58,7 @@ - + @@ -77,16 +77,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -261,6 +261,6 @@ - + diff --git a/coverage.html/Controller/DefaultController.php.html b/coverage.html/Controller/DefaultController.php.html index 38beb1d..419d5df 100644 --- a/coverage.html/Controller/DefaultController.php.html +++ b/coverage.html/Controller/DefaultController.php.html @@ -156,7 +156,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Controller/SecurityController.php.html b/coverage.html/Controller/SecurityController.php.html index 779886c..26c2208 100644 --- a/coverage.html/Controller/SecurityController.php.html +++ b/coverage.html/Controller/SecurityController.php.html @@ -199,7 +199,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Controller/TaskController.php.html b/coverage.html/Controller/TaskController.php.html index ea2c3ec..5af813b 100644 --- a/coverage.html/Controller/TaskController.php.html +++ b/coverage.html/Controller/TaskController.php.html @@ -333,7 +333,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Controller/UserController.php.html b/coverage.html/Controller/UserController.php.html index 5900372..5490902 100644 --- a/coverage.html/Controller/UserController.php.html +++ b/coverage.html/Controller/UserController.php.html @@ -43,61 +43,61 @@ - Total -
-
- 65.22% covered (warning) + Total +
+
+ 100.00% covered (success)
-
65.22%
-
15 / 23
-
-
- 66.67% covered (warning) +
100.00%
+
23 / 23
+
+
+ 100.00% covered (success)
-
66.67%
-
2 / 3
- CRAP -
-
- 0.00% covered (danger) +
100.00%
+
3 / 3
+ CRAP +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
+
100.00%
+
1 / 1
- UserController -
-
- 65.22% covered (warning) + UserController +
+
+ 100.00% covered (success)
-
65.22%
-
15 / 23
-
-
- 66.67% covered (warning) +
100.00%
+
23 / 23
+
+
+ 100.00% covered (success)
-
66.67%
-
2 / 3
- 9.06 -
-
- 0.00% covered (danger) +
100.00%
+
3 / 3
+ 7 +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
+
100.00%
+
1 / 1
@@ -145,25 +145,25 @@ -  edit -
-
- 0.00% covered (danger) +  edit +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 8
-
-
- 0.00% covered (danger) +
100.00%
+
8 / 8
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
- 12 - +
100.00%
+
1 / 1
+ 3 + @@ -234,22 +234,22 @@ 60    #[Route('/users/{id}/edit', name: 'user_edit')] 61    public function edit(User $user, Request $request, EntityManagerInterface $entityManager): Response 62    { - 63        $form = $this->createForm(UserType::class, $user, [ + 63        $form = $this->createForm(UserType::class, $user, [ 64            'require_password' => false, 65        ]); 66 - 67        $form->handleRequest($request); + 67        $form->handleRequest($request); 68 - 69        if ($form->isSubmitted() && $form->isValid()) { - 70            $entityManager->persist($user); - 71            $entityManager->flush(); + 69        if ($form->isSubmitted() && $form->isValid()) { + 70            $entityManager->persist($user); + 71            $entityManager->flush(); 72 - 73            $this->addFlash('success', "L'utilisateur a bien été modifié"); + 73            $this->addFlash('success', "L'utilisateur a bien été modifié"); 74 - 75            return $this->redirectToRoute('user_list'); + 75            return $this->redirectToRoute('user_list'); 76        } 77 - 78        return $this->renderForm('user/edit.html.twig', ['form' => $form, 'user' => $user]); + 78        return $this->renderForm('user/edit.html.twig', ['form' => $form, 'user' => $user]); 79    } 80} @@ -262,7 +262,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Controller/dashboard.html b/coverage.html/Controller/dashboard.html index 174d43e..756cadc 100644 --- a/coverage.html/Controller/dashboard.html +++ b/coverage.html/Controller/dashboard.html @@ -58,7 +58,6 @@

Insufficient Coverage

-
App\Controller\UserController65% @@ -75,7 +74,6 @@

Project Risks

- App\Controller\UserController9 @@ -113,7 +111,6 @@

Insufficient Coverage

- edit0% @@ -130,7 +127,6 @@

Project Risks

- edit12 @@ -140,7 +136,7 @@

Project Risks

@@ -159,7 +155,7 @@

Project Risks

.yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,1,0,0,0,3], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,4], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -177,7 +173,7 @@

Project Risks

.yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([1,0,0,0,0,0,0,0,0,0,0,11], "Method Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,12], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -227,7 +223,7 @@

Project Risks

chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,1,"App\\Controller\\DefaultController<\/a>"],[100,3,"App\\Controller\\SecurityController<\/a>"],[100,9,"App\\Controller\\TaskController<\/a>"],[65.21739130434783,7,"App\\Controller\\UserController<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,1,"App\\Controller\\DefaultController<\/a>"],[100,3,"App\\Controller\\SecurityController<\/a>"],[100,9,"App\\Controller\\TaskController<\/a>"],[100,7,"App\\Controller\\UserController<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -251,7 +247,7 @@

Project Risks

chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"
App\\Controller\\DefaultController::index<\/a>"],[100,1,"App\\Controller\\SecurityController::login<\/a>"],[100,1,"App\\Controller\\SecurityController::loginCheck<\/a>"],[100,1,"App\\Controller\\SecurityController::logoutCheck<\/a>"],[100,1,"App\\Controller\\TaskController::list<\/a>"],[100,3,"App\\Controller\\TaskController::create<\/a>"],[100,3,"App\\Controller\\TaskController::edit<\/a>"],[100,1,"App\\Controller\\TaskController::toggleTask<\/a>"],[100,1,"App\\Controller\\TaskController::deleteTask<\/a>"],[100,1,"App\\Controller\\UserController::list<\/a>"],[100,3,"App\\Controller\\UserController::create<\/a>"],[0,3,"App\\Controller\\UserController::edit<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"App\\Controller\\DefaultController::index<\/a>"],[100,1,"App\\Controller\\SecurityController::login<\/a>"],[100,1,"App\\Controller\\SecurityController::loginCheck<\/a>"],[100,1,"App\\Controller\\SecurityController::logoutCheck<\/a>"],[100,1,"App\\Controller\\TaskController::list<\/a>"],[100,3,"App\\Controller\\TaskController::create<\/a>"],[100,3,"App\\Controller\\TaskController::edit<\/a>"],[100,1,"App\\Controller\\TaskController::toggleTask<\/a>"],[100,1,"App\\Controller\\TaskController::deleteTask<\/a>"],[100,1,"App\\Controller\\UserController::list<\/a>"],[100,3,"App\\Controller\\UserController::create<\/a>"],[100,3,"App\\Controller\\UserController::edit<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/coverage.html/Controller/index.html b/coverage.html/Controller/index.html index 8f412e3..4343e15 100644 --- a/coverage.html/Controller/index.html +++ b/coverage.html/Controller/index.html @@ -43,31 +43,31 @@ - Total -
-
- 84.91% covered (warning) + Total +
+
+ 100.00% covered (success)
-
84.91%
-
45 / 53
+
100.00%
+
53 / 53
-
- 90.00% covered (success) +
+ 100.00% covered (success)
-
90.00%
-
9 / 10
-
-
- 75.00% covered (warning) +
100.00%
+
10 / 10
+
+
+ 100.00% covered (success)
-
75.00%
-
3 / 4
+
100.00%
+
4 / 4
@@ -155,31 +155,31 @@ -
UserController.php -
-
- 65.22% covered (warning) + UserController.php +
+
+ 100.00% covered (success)
-
65.22%
-
15 / 23
-
-
- 66.67% covered (warning) +
100.00%
+
23 / 23
+
+
+ 100.00% covered (success)
-
66.67%
-
2 / 3
-
-
- 0.00% covered (danger) +
100.00%
+
3 / 3
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
+
100.00%
+
1 / 1
@@ -195,7 +195,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Entity/Task.php.html b/coverage.html/Entity/Task.php.html index 2bd4158..9030836 100644 --- a/coverage.html/Entity/Task.php.html +++ b/coverage.html/Entity/Task.php.html @@ -444,8 +444,8 @@ 50 51    public function __construct() 52    { - 53        $this->createdAt = new \Datetime(); - 54        $this->isDone = false; + 53        $this->createdAt = new \Datetime(); + 54        $this->isDone = false; 55    } 56 57    public function getId(): int @@ -460,38 +460,38 @@ 66 67    public function setCreatedAt(\DateTime $createdAt): self 68    { - 69        $this->createdAt = $createdAt; + 69        $this->createdAt = $createdAt; 70 - 71        return $this; + 71        return $this; 72    } 73 74    public function getTitle(): string 75    { - 76        return $this->title; + 76        return $this->title; 77    } 78 79    public function setTitle(string $title): self 80    { - 81        $this->title = $title; + 81        $this->title = $title; 82 - 83        return $this; + 83        return $this; 84    } 85 86    public function getContent(): string 87    { - 88        return $this->content; + 88        return $this->content; 89    } 90 91    public function setContent(string $content): self 92    { - 93        $this->content = $content; + 93        $this->content = $content; 94 - 95        return $this; + 95        return $this; 96    } 97 98    public function isDone(): bool 99    { - 100        return $this->isDone; + 100        return $this->isDone; 101    } 102 103    public function toggle(bool $flag): self @@ -528,7 +528,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Entity/User.php.html b/coverage.html/Entity/User.php.html index 603d832..2798efe 100644 --- a/coverage.html/Entity/User.php.html +++ b/coverage.html/Entity/User.php.html @@ -528,7 +528,7 @@ 56 57    public function __construct() 58    { - 59        $this->tasks = new ArrayCollection(); + 59        $this->tasks = new ArrayCollection(); 60    } 61 62    public function getId(): ?int @@ -543,14 +543,14 @@ 71 72    public function setUsername(string $username): self 73    { - 74        $this->username = $username; + 74        $this->username = $username; 75 - 76        return $this; + 76        return $this; 77    } 78 79    public function getSalt(): ?string 80    { - 81        return null; + 81        return null; 82    } 83 84    /** @@ -563,9 +563,9 @@ 91 92    public function setPassword(string $password): self 93    { - 94        $this->password = $password; + 94        $this->password = $password; 95 - 96        return $this; + 96        return $this; 97    } 98 99    public function getEmail(): ?string @@ -575,9 +575,9 @@ 103 104    public function setEmail(string $email): self 105    { - 106        $this->email = $email; + 106        $this->email = $email; 107 - 108        return $this; + 108        return $this; 109    } 110 111    /** @@ -613,9 +613,9 @@ 141 142    public function setRoles(array $roles): self 143    { - 144        $this->roles = $roles; + 144        $this->roles = $roles; 145 - 146        return $this; + 146        return $this; 147    } 148 149 @@ -664,7 +664,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Entity/dashboard.html b/coverage.html/Entity/dashboard.html index f31d16f..d04d03b 100644 --- a/coverage.html/Entity/dashboard.html +++ b/coverage.html/Entity/dashboard.html @@ -151,7 +151,7 @@

Project Risks

diff --git a/coverage.html/Entity/index.html b/coverage.html/Entity/index.html index 742fbd1..09c5574 100644 --- a/coverage.html/Entity/index.html +++ b/coverage.html/Entity/index.html @@ -139,7 +139,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Form/TaskType.php.html b/coverage.html/Form/TaskType.php.html index 9521795..43e175e 100644 --- a/coverage.html/Form/TaskType.php.html +++ b/coverage.html/Form/TaskType.php.html @@ -189,7 +189,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Form/UserType.php.html b/coverage.html/Form/UserType.php.html index d867528..d354744 100644 --- a/coverage.html/Form/UserType.php.html +++ b/coverage.html/Form/UserType.php.html @@ -293,7 +293,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Form/dashboard.html b/coverage.html/Form/dashboard.html index e062622..b023315 100644 --- a/coverage.html/Form/dashboard.html +++ b/coverage.html/Form/dashboard.html @@ -147,7 +147,7 @@

Project Risks

diff --git a/coverage.html/Form/index.html b/coverage.html/Form/index.html index 5c9efba..6d21727 100644 --- a/coverage.html/Form/index.html +++ b/coverage.html/Form/index.html @@ -139,7 +139,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Repository/TaskRepository.php.html b/coverage.html/Repository/TaskRepository.php.html index f41b2da..6db755c 100644 --- a/coverage.html/Repository/TaskRepository.php.html +++ b/coverage.html/Repository/TaskRepository.php.html @@ -277,7 +277,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Repository/UserRepository.php.html b/coverage.html/Repository/UserRepository.php.html index 695024e..b1e784a 100644 --- a/coverage.html/Repository/UserRepository.php.html +++ b/coverage.html/Repository/UserRepository.php.html @@ -230,7 +230,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Repository/dashboard.html b/coverage.html/Repository/dashboard.html index 04f66d2..eeaa772 100644 --- a/coverage.html/Repository/dashboard.html +++ b/coverage.html/Repository/dashboard.html @@ -140,7 +140,7 @@

Project Risks

diff --git a/coverage.html/Repository/index.html b/coverage.html/Repository/index.html index 522bd97..c209148 100644 --- a/coverage.html/Repository/index.html +++ b/coverage.html/Repository/index.html @@ -124,7 +124,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Security/Voter/TaskVoter.php.html b/coverage.html/Security/Voter/TaskVoter.php.html index b5ffeae..958b89c 100644 --- a/coverage.html/Security/Voter/TaskVoter.php.html +++ b/coverage.html/Security/Voter/TaskVoter.php.html @@ -239,7 +239,7 @@

Legend

ExecutedNot ExecutedDead Code

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Security/Voter/dashboard.html b/coverage.html/Security/Voter/dashboard.html index 544aec4..49df650 100644 --- a/coverage.html/Security/Voter/dashboard.html +++ b/coverage.html/Security/Voter/dashboard.html @@ -141,7 +141,7 @@

Project Risks

diff --git a/coverage.html/Security/Voter/index.html b/coverage.html/Security/Voter/index.html index 7412e78..30e19f5 100644 --- a/coverage.html/Security/Voter/index.html +++ b/coverage.html/Security/Voter/index.html @@ -112,7 +112,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/Security/dashboard.html b/coverage.html/Security/dashboard.html index ae85b4b..d82799c 100644 --- a/coverage.html/Security/dashboard.html +++ b/coverage.html/Security/dashboard.html @@ -140,7 +140,7 @@

Project Risks

diff --git a/coverage.html/Security/index.html b/coverage.html/Security/index.html index 70342db..024f0be 100644 --- a/coverage.html/Security/index.html +++ b/coverage.html/Security/index.html @@ -111,7 +111,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/coverage.html/dashboard.html b/coverage.html/dashboard.html index a6394a1..e4c0dd1 100644 --- a/coverage.html/dashboard.html +++ b/coverage.html/dashboard.html @@ -62,7 +62,6 @@

Insufficient Coverage

App\Repository\TaskRepository0% App\Security\Voter\TaskVoter16% App\Entity\User53% - App\Controller\UserController65% App\Entity\Task84% @@ -84,7 +83,6 @@

Project Risks

App\Entity\User60 App\Security\Voter\TaskVoter55 App\Repository\TaskRepository42 - App\Controller\UserController9 @@ -122,7 +120,6 @@

Insufficient Coverage

- edit0% getId0% getCreatedAt0% __toString0% @@ -160,7 +157,6 @@

Project Risks

voteOnAttribute42 onPostSetData20 - edit12 removeTask12 buildForm12 addTask6 @@ -173,7 +169,7 @@

Project Risks

@@ -192,7 +188,7 @@

Project Risks

.yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([3,0,1,0,0,0,1,1,0,1,0,4], "Class Coverage")) + .datum(getCoverageDistributionData([3,0,1,0,0,0,1,0,0,1,0,5], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -210,7 +206,7 @@

Project Risks

.yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([20,0,0,0,0,0,0,0,0,0,0,39], "Method Coverage")) + .datum(getCoverageDistributionData([19,0,0,0,0,0,0,0,0,0,0,40], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -260,7 +256,7 @@

Project Risks

chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,1,"App\\Controller\\DefaultController<\/a>"],[100,3,"App\\Controller\\SecurityController<\/a>"],[100,9,"App\\Controller\\TaskController<\/a>"],[65.21739130434783,7,"App\\Controller\\UserController<\/a>"],[84.21052631578947,13,"App\\Entity\\Task<\/a>"],[53.57142857142857,20,"App\\Entity\\User<\/a>"],[0,2,"App\\Form\\TaskType<\/a>"],[0,9,"App\\Form\\UserType<\/a>"],[0,6,"App\\Repository\\TaskRepository<\/a>"],[100,7,"App\\Repository\\UserRepository<\/a>"],[16.666666666666664,9,"App\\Security\\Voter\\TaskVoter<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,1,"App\\Controller\\DefaultController<\/a>"],[100,3,"App\\Controller\\SecurityController<\/a>"],[100,9,"App\\Controller\\TaskController<\/a>"],[100,7,"App\\Controller\\UserController<\/a>"],[84.21052631578947,13,"App\\Entity\\Task<\/a>"],[53.57142857142857,20,"App\\Entity\\User<\/a>"],[0,2,"App\\Form\\TaskType<\/a>"],[0,9,"App\\Form\\UserType<\/a>"],[0,6,"App\\Repository\\TaskRepository<\/a>"],[100,7,"App\\Repository\\UserRepository<\/a>"],[16.666666666666664,9,"App\\Security\\Voter\\TaskVoter<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -284,7 +280,7 @@

Project Risks

chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"
App\\Controller\\DefaultController::index<\/a>"],[100,1,"App\\Controller\\SecurityController::login<\/a>"],[100,1,"App\\Controller\\SecurityController::loginCheck<\/a>"],[100,1,"App\\Controller\\SecurityController::logoutCheck<\/a>"],[100,1,"App\\Controller\\TaskController::list<\/a>"],[100,3,"App\\Controller\\TaskController::create<\/a>"],[100,3,"App\\Controller\\TaskController::edit<\/a>"],[100,1,"App\\Controller\\TaskController::toggleTask<\/a>"],[100,1,"App\\Controller\\TaskController::deleteTask<\/a>"],[100,1,"App\\Controller\\UserController::list<\/a>"],[100,3,"App\\Controller\\UserController::create<\/a>"],[0,3,"App\\Controller\\UserController::edit<\/a>"],[100,1,"App\\Entity\\Task::__construct<\/a>"],[0,1,"App\\Entity\\Task::getId<\/a>"],[0,1,"App\\Entity\\Task::getCreatedAt<\/a>"],[100,1,"App\\Entity\\Task::setCreatedAt<\/a>"],[100,1,"App\\Entity\\Task::getTitle<\/a>"],[100,1,"App\\Entity\\Task::setTitle<\/a>"],[100,1,"App\\Entity\\Task::getContent<\/a>"],[100,1,"App\\Entity\\Task::setContent<\/a>"],[100,1,"App\\Entity\\Task::isDone<\/a>"],[100,1,"App\\Entity\\Task::toggle<\/a>"],[100,1,"App\\Entity\\Task::getAuthor<\/a>"],[100,1,"App\\Entity\\Task::setAuthor<\/a>"],[0,1,"App\\Entity\\Task::__toString<\/a>"],[100,1,"App\\Entity\\User::__construct<\/a>"],[0,1,"App\\Entity\\User::getId<\/a>"],[100,1,"App\\Entity\\User::getUsername<\/a>"],[100,1,"App\\Entity\\User::setUsername<\/a>"],[100,1,"App\\Entity\\User::getSalt<\/a>"],[0,1,"App\\Entity\\User::getPassword<\/a>"],[100,1,"App\\Entity\\User::setPassword<\/a>"],[100,1,"App\\Entity\\User::getEmail<\/a>"],[100,1,"App\\Entity\\User::setEmail<\/a>"],[100,1,"App\\Entity\\User::getRoles<\/a>"],[100,1,"App\\Entity\\User::eraseCredentials<\/a>"],[0,1,"App\\Entity\\User::getUserIdentifier<\/a>"],[100,1,"App\\Entity\\User::setRoles<\/a>"],[0,1,"App\\Entity\\User::getTasks<\/a>"],[0,2,"App\\Entity\\User::addTask<\/a>"],[0,3,"App\\Entity\\User::removeTask<\/a>"],[0,1,"App\\Entity\\User::__toString<\/a>"],[0,1,"App\\Form\\TaskType::buildForm<\/a>"],[0,1,"App\\Form\\TaskType::configureOptions<\/a>"],[0,1,"App\\Form\\UserType::__construct<\/a>"],[0,3,"App\\Form\\UserType::buildForm<\/a>"],[0,4,"App\\Form\\UserType::onPostSetData<\/a>"],[0,1,"App\\Form\\UserType::configureOptions<\/a>"],[0,1,"App\\Repository\\TaskRepository::__construct<\/a>"],[100,2,"App\\Repository\\TaskRepository::add<\/a>"],[100,2,"App\\Repository\\TaskRepository::remove<\/a>"],[0,1,"App\\Repository\\TaskRepository::orderByStatus<\/a>"],[100,1,"App\\Repository\\UserRepository::__construct<\/a>"],[100,2,"App\\Repository\\UserRepository::add<\/a>"],[100,2,"App\\Repository\\UserRepository::remove<\/a>"],[100,2,"App\\Repository\\UserRepository::upgradePassword<\/a>"],[100,1,"App\\Security\\Voter\\TaskVoter::__construct<\/a>"],[100,2,"App\\Security\\Voter\\TaskVoter::supports<\/a>"],[0,6,"App\\Security\\Voter\\TaskVoter::voteOnAttribute<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"App\\Controller\\DefaultController::index<\/a>"],[100,1,"App\\Controller\\SecurityController::login<\/a>"],[100,1,"App\\Controller\\SecurityController::loginCheck<\/a>"],[100,1,"App\\Controller\\SecurityController::logoutCheck<\/a>"],[100,1,"App\\Controller\\TaskController::list<\/a>"],[100,3,"App\\Controller\\TaskController::create<\/a>"],[100,3,"App\\Controller\\TaskController::edit<\/a>"],[100,1,"App\\Controller\\TaskController::toggleTask<\/a>"],[100,1,"App\\Controller\\TaskController::deleteTask<\/a>"],[100,1,"App\\Controller\\UserController::list<\/a>"],[100,3,"App\\Controller\\UserController::create<\/a>"],[100,3,"App\\Controller\\UserController::edit<\/a>"],[100,1,"App\\Entity\\Task::__construct<\/a>"],[0,1,"App\\Entity\\Task::getId<\/a>"],[0,1,"App\\Entity\\Task::getCreatedAt<\/a>"],[100,1,"App\\Entity\\Task::setCreatedAt<\/a>"],[100,1,"App\\Entity\\Task::getTitle<\/a>"],[100,1,"App\\Entity\\Task::setTitle<\/a>"],[100,1,"App\\Entity\\Task::getContent<\/a>"],[100,1,"App\\Entity\\Task::setContent<\/a>"],[100,1,"App\\Entity\\Task::isDone<\/a>"],[100,1,"App\\Entity\\Task::toggle<\/a>"],[100,1,"App\\Entity\\Task::getAuthor<\/a>"],[100,1,"App\\Entity\\Task::setAuthor<\/a>"],[0,1,"App\\Entity\\Task::__toString<\/a>"],[100,1,"App\\Entity\\User::__construct<\/a>"],[0,1,"App\\Entity\\User::getId<\/a>"],[100,1,"App\\Entity\\User::getUsername<\/a>"],[100,1,"App\\Entity\\User::setUsername<\/a>"],[100,1,"App\\Entity\\User::getSalt<\/a>"],[0,1,"App\\Entity\\User::getPassword<\/a>"],[100,1,"App\\Entity\\User::setPassword<\/a>"],[100,1,"App\\Entity\\User::getEmail<\/a>"],[100,1,"App\\Entity\\User::setEmail<\/a>"],[100,1,"App\\Entity\\User::getRoles<\/a>"],[100,1,"App\\Entity\\User::eraseCredentials<\/a>"],[0,1,"App\\Entity\\User::getUserIdentifier<\/a>"],[100,1,"App\\Entity\\User::setRoles<\/a>"],[0,1,"App\\Entity\\User::getTasks<\/a>"],[0,2,"App\\Entity\\User::addTask<\/a>"],[0,3,"App\\Entity\\User::removeTask<\/a>"],[0,1,"App\\Entity\\User::__toString<\/a>"],[0,1,"App\\Form\\TaskType::buildForm<\/a>"],[0,1,"App\\Form\\TaskType::configureOptions<\/a>"],[0,1,"App\\Form\\UserType::__construct<\/a>"],[0,3,"App\\Form\\UserType::buildForm<\/a>"],[0,4,"App\\Form\\UserType::onPostSetData<\/a>"],[0,1,"App\\Form\\UserType::configureOptions<\/a>"],[0,1,"App\\Repository\\TaskRepository::__construct<\/a>"],[100,2,"App\\Repository\\TaskRepository::add<\/a>"],[100,2,"App\\Repository\\TaskRepository::remove<\/a>"],[0,1,"App\\Repository\\TaskRepository::orderByStatus<\/a>"],[100,1,"App\\Repository\\UserRepository::__construct<\/a>"],[100,2,"App\\Repository\\UserRepository::add<\/a>"],[100,2,"App\\Repository\\UserRepository::remove<\/a>"],[100,2,"App\\Repository\\UserRepository::upgradePassword<\/a>"],[100,1,"App\\Security\\Voter\\TaskVoter::__construct<\/a>"],[100,2,"App\\Security\\Voter\\TaskVoter::supports<\/a>"],[0,6,"App\\Security\\Voter\\TaskVoter::voteOnAttribute<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/coverage.html/index.html b/coverage.html/index.html index 2802c7c..03d6d3a 100644 --- a/coverage.html/index.html +++ b/coverage.html/index.html @@ -44,57 +44,57 @@ Total
-
- 53.79% covered (warning) +
+ 59.31% covered (warning)
-
53.79%
-
78 / 145
+
59.31%
+
86 / 145
-
- 60.00% covered (warning) +
+ 62.00% covered (warning)
-
60.00%
-
30 / 50
+
62.00%
+
31 / 50
-
- 30.00% covered (danger) +
+ 40.00% covered (danger)
-
30.00%
-
3 / 10
+
40.00%
+
4 / 10
-
Controller -
-
- 84.91% covered (warning) + Controller +
+
+ 100.00% covered (success)
-
84.91%
-
45 / 53
+
100.00%
+
53 / 53
-
- 90.00% covered (success) +
+ 100.00% covered (success)
-
90.00%
-
9 / 10
-
-
- 75.00% covered (warning) +
100.00%
+
10 / 10
+
+
+ 100.00% covered (success)
-
75.00%
-
3 / 4
+
100.00%
+
4 / 4
@@ -222,7 +222,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Wed Nov 23 17:40:21 UTC 2022. + Generated by php-code-coverage 9.2.18 using PHP 8.0.20 and PHPUnit 9.5.26 at Mon Nov 28 19:34:06 UTC 2022.

diff --git a/tests/Controller/UserControllerTest.php b/tests/Controller/UserControllerTest.php index b2f6251..c539fb4 100644 --- a/tests/Controller/UserControllerTest.php +++ b/tests/Controller/UserControllerTest.php @@ -89,6 +89,7 @@ public function testNonAdminUserCannotCreateNewUser(): void /** * @covers \App\Controller\UserController::edit + * @uses \App\Form\UserType */ public function testAdminUserCanEditAnotherUser(): void { @@ -115,18 +116,52 @@ public function testAdminUserCanEditAnotherUser(): void /** * @covers \App\Controller\UserController::edit + * @uses \App\Form\UserType */ public function testAdminUserCanPromoteAnotherUser(): void { - $this->markTestIncomplete(); + $client = $this->createClient(); + $userRepository = $this->getEntityManager()->getRepository(User::class); + $admin = $userRepository->findOneBy(['username' => 'admin']); + $user = $userRepository->findOneBy(['username' => 'userwhichwillchange']); + $userId = $user->getId(); + $client->loginUser($admin); + $client->request("GET", "/users/$userId/edit"); + $client->submitForm('Modifier', [ + 'user[roles]' => 'ROLE_ADMIN', + ]); + $client->followRedirects(); + $userAfterUpdate = $userRepository->find($userId); + $this->assertNotContains('ROLE_ADMIN', $user->getRoles()); + $this->assertResponseRedirects('/users', 302); + $this->assertNotNull($userRepository->findOneBy(['username' => 'userwhichwillchange'])); + $this->assertContains('ROLE_ADMIN', $userAfterUpdate->getRoles()); + } /** * @covers \App\Controller\UserController::edit + * @uses \App\Form\UserType */ public function testAdminUserCanDemoteAnotherUser(): void { - $this->markTestIncomplete(); + $client = $this->createClient(); + $userRepository = $this->getEntityManager()->getRepository(User::class); + $admin = $userRepository->findOneBy(['username' => 'admin']); + $user = $userRepository->findOneBy(['username' => 'userwhichwillchange']); + $userId = $user->getId(); + $client->loginUser($admin); + $client->request("GET", "/users/$userId/edit"); + $client->submitForm('Modifier', [ + 'user[roles]' => 'ROLE_USER', + ]); + $client->followRedirects(); + $userAfterUpdate = $userRepository->find($userId); + $this->assertContains('ROLE_ADMIN', $user->getRoles()); + $this->assertResponseRedirects('/users', 302); + $this->assertNotNull($userRepository->findOneBy(['username' => 'userwhichwillchange'])); + $this->assertContains('ROLE_USER', $userAfterUpdate->getRoles()); + $this->assertNotContains('ROLE_ADMIN', $userAfterUpdate->getRoles()); } /** @@ -134,6 +169,16 @@ public function testAdminUserCanDemoteAnotherUser(): void */ public function testNonAdminUserCannotEditAnotherUser(): void { - $this->markTestIncomplete(); + $client = $this->createClient(); + $userRepository = $this->getEntityManager()->getRepository(User::class); + $simpleUser = $userRepository->findOneBy(['username' => 'simpleuser']); + $subjectUser = $userRepository->findOneBy(['username' => 'userwhichwillchange']); + $client->loginUser($simpleUser); + $userId = $subjectUser->getId(); + $client->request("GET", "/users/$userId/edit"); + $client->followRedirects(); + $this->assertNotContains('ROLE_ADMIN', $simpleUser->getRoles()); + $this->assertResponseStatusCodeSame(403); // Forbidden + } }