From 24778d3ffb375eb032d6a7dca4c6741da349bb16 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Mon, 11 Aug 2025 18:57:42 +0200 Subject: [PATCH] replace PHPUnit annotations with attributes (#5608) --- .github/workflows/testing.yaml | 2 +- .php-cs-fixer.dist.php | 1 + src/Customer/CustomerStatisticService.php | 4 +- src/Repository/ActivityRepository.php | 2 +- src/Repository/CustomerRateRepository.php | 2 +- src/Repository/ExportTemplateRepository.php | 2 +- src/Repository/InvoiceRepository.php | 2 +- src/Repository/InvoiceTemplateRepository.php | 2 +- src/Repository/ProjectRateRepository.php | 2 +- src/Repository/ProjectRepository.php | 2 +- src/Repository/RolePermissionRepository.php | 2 +- src/Repository/RoleRepository.php | 2 +- .../TimesheetLongRunningValidator.php | 3 +- tests/API/ActionsControllerTest.php | 5 +-- tests/API/ActivityControllerTest.php | 10 ++--- tests/API/ApiDocControllerTest.php | 5 +-- .../Authentication/AccessTokenHandlerTest.php | 5 +-- .../Authentication/TokenAuthenticatorTest.php | 8 ++-- tests/API/AuthenticationTest.php | 8 ++-- tests/API/ConfigurationControllerTest.php | 5 +-- tests/API/CustomerControllerTest.php | 5 +-- tests/API/ExportControllerTest.php | 5 +-- tests/API/InvoiceControllerTest.php | 5 +-- tests/API/Model/PageActionTest.php | 5 +-- tests/API/Model/TimesheetConfigTest.php | 5 +-- tests/API/Model/VersionTest.php | 5 +-- tests/API/NotFoundExceptionTest.php | 5 +-- tests/API/ProjectControllerTest.php | 10 ++--- ...idationFailedExceptionErrorHandlerTest.php | 5 +-- tests/API/StatusControllerTest.php | 5 +-- tests/API/TagControllerTest.php | 5 +-- tests/API/TeamControllerTest.php | 10 ++--- tests/API/TimesheetControllerTest.php | 10 ++--- tests/API/UserControllerTest.php | 10 ++--- tests/Activity/ActivityServiceTest.php | 10 ++--- tests/Calendar/CalendarSourceTest.php | 5 +-- tests/Calendar/GoogleSourceTest.php | 5 +-- tests/Calendar/GoogleTest.php | 5 +-- tests/Calendar/RecentActivitiesSourceTest.php | 5 +-- tests/Calendar/TimesheetEntryTest.php | 5 +-- tests/Command/ActivateUserCommandTest.php | 8 ++-- tests/Command/BundleInstallerCommandTest.php | 8 ++-- tests/Command/ChangePasswordCommandTest.php | 11 ++--- tests/Command/CreateUserCommandTest.php | 8 ++-- tests/Command/DeactivateUserCommandTest.php | 8 ++-- tests/Command/DemoteUserCommandTest.php | 11 ++--- tests/Command/ExportCreateCommandTest.php | 8 ++-- tests/Command/InstallCommandTest.php | 8 ++-- tests/Command/InvoiceCreateCommandTest.php | 8 ++-- tests/Command/ListUserCommandTest.php | 8 ++-- tests/Command/MailTestCommandTest.php | 8 ++-- tests/Command/PluginCommandTest.php | 8 ++-- tests/Command/PromoteUserCommandTest.php | 11 ++--- tests/Command/ReloadCommandTest.php | 8 ++-- tests/Command/ResetDevelopmentCommandTest.php | 8 ++-- tests/Command/ResetTestCommandTest.php | 8 ++-- tests/Command/TimesheetStopAllCommandTest.php | 8 ++-- tests/Command/UserLoginLinkCommandTest.php | 8 ++-- tests/Command/VersionCommandTest.php | 13 +++--- tests/Configuration/LdapConfigurationTest.php | 8 ++-- tests/Configuration/LocaleServiceTest.php | 10 ++--- tests/Configuration/MailConfigurationTest.php | 5 +-- tests/Configuration/SamlConfigurationTest.php | 8 ++-- .../Configuration/SystemConfigurationTest.php | 5 +-- tests/ConsoleApplicationTest.php | 5 +-- tests/ConstantsTest.php | 5 +-- tests/Controller/AboutControllerTest.php | 5 +-- tests/Controller/ActivityControllerTest.php | 10 ++--- tests/Controller/Auth/SamlControllerTest.php | 5 +-- tests/Controller/CalendarControllerTest.php | 5 +-- tests/Controller/ContractControllerTest.php | 5 +-- tests/Controller/CustomerControllerTest.php | 10 ++--- tests/Controller/DashboardControllerTest.php | 6 +-- tests/Controller/DoctorControllerTest.php | 5 +-- tests/Controller/ExportControllerTest.php | 5 +-- tests/Controller/FavoriteControllerTest.php | 5 +-- tests/Controller/HelpControllerTest.php | 5 +-- tests/Controller/HomepageControllerTest.php | 5 +-- tests/Controller/InvoiceControllerTest.php | 5 +-- tests/Controller/LayoutControllerTest.php | 5 +-- tests/Controller/PermissionControllerTest.php | 5 +-- tests/Controller/PluginControllerTest.php | 5 +-- tests/Controller/ProfileControllerTest.php | 22 ++++------ tests/Controller/ProjectControllerTest.php | 10 ++--- tests/Controller/QuickEntryControllerTest.php | 5 +-- .../AbstractUserPeriodControllerTestCase.php | 14 +++---- .../AbstractUsersPeriodControllerTestCase.php | 18 +++----- .../CustomerMonthlyProjectsControllerTest.php | 5 +-- .../ProjectDateRangeControllerTest.php | 5 +-- .../ProjectDetailsControllerTest.php | 5 +-- .../ProjectInactiveControllerTest.php | 5 +-- .../Reporting/ProjectViewControllerTest.php | 5 +-- .../ReportUsersMonthControllerTest.php | 6 +-- .../ReportUsersWeekControllerTest.php | 6 +-- .../ReportUsersYearControllerTest.php | 6 +-- .../Reporting/UserMonthControllerTest.php | 6 +-- .../Reporting/UserWeekControllerTest.php | 6 +-- .../Reporting/UserYearControllerTest.php | 6 +-- tests/Controller/ReportingControllerTest.php | 5 +-- .../Security/PasswordResetControllerTest.php | 5 +-- .../Security/SecurityControllerTest.php | 4 +- .../SelfRegistrationControllerTest.php | 10 ++--- .../SystemConfigurationControllerTest.php | 5 +-- tests/Controller/TagControllerTest.php | 5 +-- tests/Controller/TeamControllerTest.php | 5 +-- tests/Controller/TimesheetControllerTest.php | 14 +++---- .../TimesheetTeamControllerTest.php | 5 +-- tests/Controller/UserControllerTest.php | 10 ++--- tests/Controller/WidgetControllerTest.php | 5 +-- tests/Controller/WizardControllerTest.php | 5 +-- tests/Customer/CustomerServiceTest.php | 10 ++--- .../DependencyInjection/AppExtensionTest.php | 5 +-- .../ExportServiceCompilerPassTest.php | 5 +-- .../InvoiceServiceCompilerPassTest.php | 5 +-- .../Compiler/TwigContextCompilerPassTest.php | 5 +-- .../Compiler/WidgetCompilerPassTest.php | 5 +-- .../DependencyInjection/ConfigurationTest.php | 5 +-- tests/Doctrine/TimesheetSubscriberTest.php | 5 +-- .../Doctrine/UTCDateTimeImmutableTypeTest.php | 20 ++++----- tests/Doctrine/UTCDateTimeTypeTest.php | 20 ++++----- tests/Entity/AccessTokenTest.php | 5 +-- tests/Entity/ActivityMetaTest.php | 5 +-- tests/Entity/ActivityRateTest.php | 3 +- tests/Entity/ActivityTest.php | 5 +-- tests/Entity/BookmarkTest.php | 5 +-- tests/Entity/ConfigurationTest.php | 5 +-- tests/Entity/CustomerCommentTest.php | 3 +- tests/Entity/CustomerMetaTest.php | 5 +-- tests/Entity/CustomerRateTest.php | 3 +- tests/Entity/CustomerTest.php | 5 +-- tests/Entity/ExportTemplateTest.php | 5 +-- tests/Entity/InvoiceDocumentTest.php | 5 +-- tests/Entity/InvoiceMetaTest.php | 5 +-- tests/Entity/InvoiceTemplateTest.php | 5 +-- tests/Entity/InvoiceTest.php | 5 +-- tests/Entity/ProjectCommentTest.php | 3 +- tests/Entity/ProjectMetaTest.php | 5 +-- tests/Entity/ProjectRateTest.php | 3 +- tests/Entity/ProjectTest.php | 5 +-- tests/Entity/RolePermissionTest.php | 5 +-- tests/Entity/RoleTest.php | 5 +-- tests/Entity/TagTest.php | 5 +-- tests/Entity/TeamTest.php | 5 +-- tests/Entity/TimesheetMetaTest.php | 5 +-- tests/Entity/TimesheetTest.php | 5 +-- tests/Entity/TimesheetValidationTest.php | 8 ++-- tests/Entity/UserPreferenceTest.php | 5 +-- tests/Entity/UserTest.php | 8 ++-- tests/Entity/UserValidationTest.php | 17 ++++---- tests/Entity/WorkingTimeTest.php | 5 +-- .../ActivityBudgetStatisticEventTest.php | 5 +-- tests/Event/ActivityCreateEventTest.php | 7 ++-- tests/Event/ActivityCreatePostEventTest.php | 7 ++-- tests/Event/ActivityCreatePreEventTest.php | 7 ++-- .../ActivityDetailControllerEventTest.php | 7 ++-- .../Event/ActivityMetaDefinitionEventTest.php | 5 +-- tests/Event/ActivityMetaDisplayEventTest.php | 8 ++-- tests/Event/ActivityStatisticEventTest.php | 7 ++-- tests/Event/ActivityUpdatePostEventTest.php | 7 ++-- tests/Event/ActivityUpdatePreEventTest.php | 7 ++-- .../Event/CalendarConfigurationEventTest.php | 5 +-- .../CalendarDragAndDropSourceEventTest.php | 5 +-- tests/Event/CalendarGoogleSourceEventTest.php | 5 +-- tests/Event/CalendarSourceEventTest.php | 5 +-- tests/Event/ConfigureMainMenuEventTest.php | 8 ++-- tests/Event/CustomerCreateEventTest.php | 7 ++-- tests/Event/CustomerCreatePostEventTest.php | 7 ++-- tests/Event/CustomerCreatePreEventTest.php | 7 ++-- .../CustomerDetailControllerEventTest.php | 7 ++-- .../Event/CustomerMetaDefinitionEventTest.php | 5 +-- tests/Event/CustomerMetaDisplayEventTest.php | 8 ++-- tests/Event/CustomerStatisticEventTest.php | 7 ++-- tests/Event/CustomerUpdatePostEventTest.php | 7 ++-- tests/Event/CustomerUpdatePreEventTest.php | 7 ++-- tests/Event/DashboardEventTest.php | 5 +-- tests/Event/EmailEventTest.php | 5 +-- tests/Event/EmailPasswordResetEventTest.php | 11 ++--- .../Event/EmailSelfRegistrationEventTest.php | 11 ++--- tests/Event/InvoiceCreatedEventTest.php | 8 ++-- tests/Event/InvoiceDeleteEventTest.php | 8 ++-- tests/Event/InvoiceDocumentsEventTest.php | 5 +-- tests/Event/InvoicePostRenderEventTest.php | 5 +-- tests/Event/InvoicePreRenderEventTest.php | 5 +-- tests/Event/PageActionsEventTest.php | 5 +-- tests/Event/PermissionsEventTest.php | 5 +-- tests/Event/PrepareUserEventTest.php | 5 +-- .../Event/ProjectBudgetStatisticEventTest.php | 5 +-- tests/Event/ProjectCreateEventTest.php | 7 ++-- tests/Event/ProjectCreatePostEventTest.php | 7 ++-- tests/Event/ProjectCreatePreEventTest.php | 7 ++-- .../ProjectDetailControllerEventTest.php | 7 ++-- .../Event/ProjectMetaDefinitionEventTest.php | 5 +-- tests/Event/ProjectMetaDisplayEventTest.php | 8 ++-- tests/Event/ProjectMetaQueryDisplayTest.php | 5 +-- tests/Event/ProjectStatisticEventTest.php | 7 ++-- tests/Event/ProjectUpdatePostEventTest.php | 7 ++-- tests/Event/ProjectUpdatePreEventTest.php | 7 ++-- tests/Event/RecentActivityEventTest.php | 5 +-- tests/Event/ReportingEventTest.php | 5 +-- tests/Event/RevenueStatisticEventTest.php | 5 +-- tests/Event/SystemConfigurationEventTest.php | 5 +-- tests/Event/ThemeEventTest.php | 10 ++--- .../ThemeJavascriptTranslationsEventTest.php | 8 ++-- tests/Event/TimesheetCreatePostEventTest.php | 7 ++-- tests/Event/TimesheetCreatePreEventTest.php | 7 ++-- .../TimesheetDeleteMultiplePreEventTest.php | 7 ++-- tests/Event/TimesheetDeletePreEventTest.php | 7 ++-- .../Event/TimesheetDuplicatePostEventTest.php | 5 +-- .../Event/TimesheetDuplicatePreEventTest.php | 5 +-- .../TimesheetMetaDefinitionEventTest.php | 5 +-- tests/Event/TimesheetMetaDisplayEventTest.php | 8 ++-- tests/Event/TimesheetRestartPostEventTest.php | 5 +-- tests/Event/TimesheetRestartPreEventTest.php | 5 +-- tests/Event/TimesheetStopPostEventTest.php | 7 ++-- tests/Event/TimesheetStopPreEventTest.php | 7 ++-- .../TimesheetUpdateMultiplePostEventTest.php | 7 ++-- .../TimesheetUpdateMultiplePreEventTest.php | 7 ++-- tests/Event/TimesheetUpdatePostEventTest.php | 7 ++-- tests/Event/TimesheetUpdatePreEventTest.php | 7 ++-- tests/Event/UserCreateEventTest.php | 8 ++-- tests/Event/UserCreatePostEventTest.php | 8 ++-- tests/Event/UserCreatePreEventTest.php | 8 ++-- tests/Event/UserInteractiveLoginEventTest.php | 8 ++-- .../Event/UserPreferenceDisplayEventTest.php | 5 +-- tests/Event/UserPreferenceEventTest.php | 5 +-- tests/Event/UserRevenueStatisticEventTest.php | 5 +-- tests/Event/UserUpdatePostEventTest.php | 8 ++-- tests/Event/UserUpdatePreEventTest.php | 8 ++-- .../WorkContractDetailControllerEventTest.php | 5 +-- .../WorkingTimeApproveMonthEventTest.php | 5 +-- .../Event/WorkingTimeUnlockMonthEventTest.php | 5 +-- tests/Event/WorkingTimeYearEventTest.php | 5 +-- .../Event/WorkingTimeYearSummaryEventTest.php | 5 +-- .../AbstractActionsSubscriberTestCase.php | 5 +-- .../Actions/ActivitiesSubscriberTest.php | 5 +-- .../Actions/ActivitySubscriberTest.php | 5 +-- .../Actions/CustomerSubscriberTest.php | 5 +-- .../Actions/CustomersSubscriberTest.php | 5 +-- .../Actions/InvoiceArchiveSubscriberTest.php | 5 +-- .../Actions/InvoiceDocumentSubscriberTest.php | 5 +-- .../Actions/InvoiceSubscriberTest.php | 5 +-- .../Actions/InvoiceTemplateSubscriberTest.php | 5 +-- .../InvoiceTemplatesSubscriberTest.php | 5 +-- .../Actions/PermissionsSubscriberTest.php | 5 +-- .../Actions/PluginSubscriberTest.php | 5 +-- .../Actions/ProjectSubscriberTest.php | 5 +-- .../Actions/ProjectsSubscriberTest.php | 5 +-- .../Actions/TagSubscriberTest.php | 5 +-- .../Actions/TagsSubscriberTest.php | 5 +-- .../Actions/TeamSubscriberTest.php | 5 +-- .../Actions/TeamsSubscriberTest.php | 5 +-- .../Actions/TimesheetSubscriberTest.php | 11 ++--- .../Actions/TimesheetTeamSubscriberTest.php | 5 +-- .../Actions/TimesheetsSubscriberTest.php | 8 ++-- .../Actions/TimesheetsTeamSubscriberTest.php | 8 ++-- .../Actions/UserSubscriberTest.php | 5 +-- .../Actions/UsersSubscriberTest.php | 5 +-- .../AjaxAuthenticationSubscriberTest.php | 22 ++++------ tests/EventSubscriber/EmailSubscriberTest.php | 5 +-- .../LastLoginSubscriberTest.php | 5 +-- tests/EventSubscriber/MenuSubscriberTest.php | 5 +-- .../PagerfantaExceptionSubscriberTest.php | 5 +-- .../EventSubscriber/ProfileSubscriberTest.php | 10 ++--- .../RedirectToLocaleSubscriberTest.php | 5 +-- .../UserDetailsSubscriberTest.php | 5 +-- .../UserPreferenceSubscriberTest.php | 5 +-- .../EventSubscriber/WizardSubscriberTest.php | 5 +-- tests/Export/Annotation/ExposeTest.php | 5 +-- tests/Export/Annotation/OrderTest.php | 5 +-- tests/Export/Base/CsvRendererTest.php | 16 ++++---- tests/Export/Base/PdfRendererTest.php | 6 ++- tests/Export/Base/SpreadsheetRendererTest.php | 13 +++--- tests/Export/Base/XlsxRendererTest.php | 11 +++-- tests/Export/ExportFilenameTest.php | 5 +-- .../CellFormatter/ArrayFormatterTest.php | 5 +-- .../CellFormatter/BooleanFormatterTest.php | 5 +-- .../CellFormatter/DateFormatterTest.php | 5 +-- .../CellFormatter/DateStringFormatterTest.php | 5 +-- .../CellFormatter/DefaultFormatterTest.php | 5 +-- .../DurationDecimalFormatterTest.php | 5 +-- .../CellFormatter/DurationFormatterTest.php | 5 +-- .../DurationPlainFormatterTest.php | 5 +-- .../CellFormatter/RateFormatterTest.php | 5 +-- .../CellFormatter/TextFormatterTest.php | 5 +-- .../CellFormatter/TimeFormatterTest.php | 5 +-- tests/Export/Package/ColumnTest.php | 5 +-- .../Package/PhpOfficeSpreadsheetTest.php | 5 +-- tests/Export/Package/SpoutSpreadsheetTest.php | 5 +-- .../Renderer/CsvRendererFactoryTest.php | 5 +-- .../Renderer/HtmlRendererFactoryTest.php | 5 +-- tests/Export/Renderer/HtmlRendererTest.php | 6 ++- .../Renderer/PdfRendererFactoryTest.php | 5 +-- tests/Export/Renderer/PdfRendererTest.php | 6 ++- .../Renderer/XlsxRendererFactoryTest.php | 5 +-- tests/Export/ServiceExportTest.php | 5 +-- .../Spreadsheet/ActivityExporterTest.php | 5 +-- .../AnnotatedObjectExporterTest.php | 5 +-- .../CellFormatter/ArrayFormatterTest.php | 5 +-- .../CellFormatter/BooleanFormatterTest.php | 5 +-- .../CellFormatter/DateFormatterTest.php | 5 +-- .../CellFormatter/DateTimeFormatterTest.php | 5 +-- .../CellFormatter/DurationFormatterTest.php | 5 +-- .../CellFormatter/StringFormatterTest.php | 5 +-- .../CellFormatter/TimeFormatterTest.php | 5 +-- .../Spreadsheet/ColumnDefinitionTest.php | 8 ++-- .../Spreadsheet/CustomerExporterTest.php | 5 +-- .../EntityWithMetaFieldsExporterTest.php | 5 +-- .../Extractor/AnnotationExtractorTest.php | 13 +++--- .../Extractor/MetaFieldExtractorTest.php | 7 ++-- .../Extractor/UserPreferenceExtractorTest.php | 7 ++-- .../Spreadsheet/ProjectExporterTest.php | 5 +-- .../Spreadsheet/SpreadsheetExporterTest.php | 5 +-- tests/Export/Spreadsheet/UserExporterTest.php | 5 +-- .../Writer/BinaryFileResponseWriterTest.php | 5 +-- .../Spreadsheet/Writer/XlsxWriterTest.php | 5 +-- tests/Export/TemplateTest.php | 5 +-- tests/Export/Timesheet/HtmlRendererTest.php | 8 ++-- tests/Export/Timesheet/PdfRendererTest.php | 6 ++- .../Export/TimesheetExportRepositoryTest.php | 5 +-- tests/Form/ActivityEditFormTest.php | 5 +-- tests/Form/CustomerEditFormTest.php | 5 +-- ...DurationStringToSecondsTransformerTest.php | 22 ++++------ .../SearchTermTransformerTest.php | 5 +-- .../TagArrayToStringTransformerTest.php | 5 +-- .../ExportTemplateSpreadsheetFormTest.php | 5 +-- .../DocumentationLinkExtensionTest.php | 5 +-- .../EnhancedChoiceTypeExtensionTest.php | 10 ++--- tests/Form/Extension/IconExtensionTest.php | 5 +-- tests/Form/Helper/ActivityHelperTest.php | 5 +-- tests/Form/Helper/CustomerHelperTest.php | 5 +-- tests/Form/Helper/ProjectHelperTest.php | 5 +-- tests/Form/Model/DateRangeTest.php | 5 +-- tests/Form/Model/SystemConfigurationTest.php | 7 ++-- .../MultiUpdate/MultiUpdateTableDTOTest.php | 5 +-- .../TimesheetMultiUpdateDTOTest.php | 5 +-- tests/Form/ProjectEditFormTest.php | 5 +-- tests/Form/Type/DurationTypeTest.php | 10 ++--- tests/Form/Type/ExportColumnsTypeTest.php | 8 ++-- tests/Form/Type/ExportRendererTypeTest.php | 10 ++--- tests/Form/Type/MinuteIncrementTypeTest.php | 5 +-- .../Form/Type/QuickEntryTimesheetTypeTest.php | 10 ++--- .../ActivityInvoiceCalculatorTest.php | 14 ++++--- .../ActivityUserInvoiceCalculatorTest.php | 14 ++++--- .../Calculator/DateInvoiceCalculatorTest.php | 14 ++++--- .../DateUserInvoiceCalculatorTest.php | 14 ++++--- .../Calculator/DefaultCalculatorTest.php | 8 ++-- .../Calculator/PriceInvoiceCalculatorTest.php | 14 ++++--- .../ProjectInvoiceCalculatorTest.php | 14 ++++--- .../ProjectUserInvoiceCalculatorTest.php | 14 ++++--- .../Calculator/ShortInvoiceCalculatorTest.php | 11 ++--- .../Calculator/UserInvoiceCalculatorTest.php | 11 ++--- .../WeeklyInvoiceCalculatorTest.php | 14 ++++--- .../InvoiceItemDefaultHydratorTest.php | 5 +-- .../InvoiceModelActivityHydratorTest.php | 5 +-- .../InvoiceModelCustomerHydratorTest.php | 5 +-- .../InvoiceModelDefaultHydratorTest.php | 5 +-- .../InvoiceModelProjectHydratorTest.php | 5 +-- .../Hydrator/InvoiceModelUserHydratorTest.php | 5 +-- tests/Invoice/InvoiceFilenameTest.php | 5 +-- tests/Invoice/InvoiceItemTest.php | 5 +-- tests/Invoice/InvoiceModelTest.php | 5 +-- .../ConfigurableNumberGeneratorTest.php | 21 ++++------ .../DateNumberGeneratorTest.php | 5 +-- tests/Invoice/Renderer/DebugRendererTest.php | 5 +-- tests/Invoice/Renderer/DocxRendererTest.php | 11 ++--- tests/Invoice/Renderer/OdsRendererTest.php | 19 +++++---- tests/Invoice/Renderer/PdfRendererTest.php | 11 ++--- tests/Invoice/Renderer/TwigRendererTest.php | 11 ++--- tests/Invoice/Renderer/XlsxRendererTest.php | 22 +++++----- tests/Invoice/ServiceInvoiceTest.php | 5 +-- tests/KernelTest.php | 5 +-- tests/Ldap/FormLoginLdapFactoryTest.php | 5 +-- tests/Ldap/LdapBadgeTest.php | 5 +-- tests/Ldap/LdapDriverExceptionTest.php | 5 +-- tests/Ldap/LdapDriverTest.php | 5 +-- tests/Ldap/LdapManagerTest.php | 15 +++---- tests/Ldap/LdapUserProviderTest.php | 5 +-- tests/Ldap/SanitizingExceptionTest.php | 5 +-- tests/Mail/KimaiMailerTest.php | 5 +-- .../ActivityBudgetStatisticModelTest.php | 5 +-- tests/Model/ActivityStatisticTest.php | 5 +-- tests/Model/BudgetStatisticModelTest.php | 5 +-- .../CustomerBudgetStatisticModelTest.php | 5 +-- tests/Model/CustomerStatisticTest.php | 5 +-- tests/Model/DailyStatisticTest.php | 5 +-- tests/Model/DayTest.php | 5 +-- tests/Model/MonthTest.php | 5 +-- tests/Model/MonthlyStatisticTest.php | 5 +-- tests/Model/PermissionSectionTest.php | 5 +-- .../Model/ProjectBudgetStatisticModelTest.php | 5 +-- tests/Model/ProjectStatisticTest.php | 6 +-- tests/Model/QuickEntryModelTest.php | 5 +-- tests/Model/QuickEntryWeekTest.php | 5 +-- tests/Model/Statistic/BudgetStatisticTest.php | 5 +-- tests/Model/Statistic/DayTest.php | 5 +-- tests/Model/Statistic/MonthTest.php | 14 +++---- tests/Model/Statistic/StatisticDateTest.php | 5 +-- tests/Model/Statistic/TimesheetTest.php | 5 +-- tests/Model/Statistic/YearTest.php | 5 +-- tests/Model/TimesheetCountedStatisticTest.php | 5 +-- tests/Model/TimesheetStatisticTest.php | 5 +-- tests/Model/UserStatisticTest.php | 5 +-- tests/Model/YearTest.php | 5 +-- tests/Pdf/MPdfConverterTest.php | 8 ++-- tests/Pdf/PdfContextTest.php | 5 +-- tests/Plugin/PackageTest.php | 5 +-- tests/Plugin/PluginManagerTest.php | 10 ++--- tests/Plugin/PluginMetadataTest.php | 5 +-- tests/Plugin/PluginTest.php | 5 +-- tests/Project/ProjectServiceTest.php | 10 ++--- .../Reporting/AbstractDateByUserTestCase.php | 8 ++-- tests/Reporting/AbstractUserListTestCase.php | 5 +-- .../Reporting/MonthByUser/MonthByUserTest.php | 7 ++-- .../MonthlyUserList/MonthlyUserListTest.php | 7 ++-- .../ProjectDateRangeQueryTest.php | 5 +-- .../ProjectDetailsModelTest.php | 5 +-- .../ProjectDetailsQueryTest.php | 5 +-- .../ProjectInactiveQueryTest.php | 5 +-- .../ProjectView/ProjectViewModelTest.php | 5 +-- .../ProjectView/ProjectViewQueryTest.php | 5 +-- tests/Reporting/ReportTest.php | 5 +-- tests/Reporting/ReportingServiceTest.php | 5 +-- tests/Reporting/WeekByUser/WeekByUserTest.php | 7 ++-- .../WeeklyUserList/WeeklyUserListTest.php | 7 ++-- tests/Reporting/YearByUser/YearByUserTest.php | 7 ++-- .../YearlyUserList/YearlyUserListTest.php | 7 ++-- .../InvoiceDocumentRepositoryTest.php | 5 +-- .../Repository/Loader/ActivityLoaderTest.php | 5 +-- .../Repository/Loader/CustomerLoaderTest.php | 5 +-- tests/Repository/Loader/ProjectLoaderTest.php | 5 +-- tests/Repository/Loader/TeamLoaderTest.php | 5 +-- .../AbstractBaseFormTypeQueryTestCase.php | 6 +-- .../Query/ActivityFormTypeQueryTest.php | 8 ++-- tests/Repository/Query/ActivityQueryTest.php | 8 ++-- tests/Repository/Query/BaseQueryTest.php | 5 +-- .../Query/CustomerFormTypeQueryTest.php | 8 ++-- tests/Repository/Query/CustomerQueryTest.php | 5 +-- tests/Repository/Query/ExportQueryTest.php | 8 ++-- .../Query/InvoiceArchiveQueryTest.php | 5 +-- tests/Repository/Query/InvoiceQueryTest.php | 8 ++-- .../Query/ProjectFormTypeQueryTest.php | 8 ++-- tests/Repository/Query/ProjectQueryTest.php | 8 ++-- .../Repository/Query/TagFormTypeQueryTest.php | 8 ++-- tests/Repository/Query/TagQueryTest.php | 5 +-- tests/Repository/Query/TeamQueryTest.php | 5 +-- tests/Repository/Query/TimesheetQueryTest.php | 8 ++-- .../Query/UserFormTypeQueryTest.php | 8 ++-- tests/Repository/Query/UserQueryTest.php | 5 +-- .../Result/TimesheetResultStatisticTest.php | 5 +-- .../Search/SearchConfigurationTest.php | 5 +-- tests/Repository/Search/SearchHelperTest.php | 34 +++++++-------- tests/Repository/TagRepositoryTest.php | 8 ++-- .../TimesheetInvoiceItemRepositoryTest.php | 5 +-- tests/Repository/TimesheetRepositoryTest.php | 8 ++-- tests/Saml/SamlBadgeTest.php | 5 +-- tests/Saml/SamlLogoutSubscriberTest.php | 5 +-- tests/Saml/SamlProviderTest.php | 5 +-- tests/Saml/SamlTokenTest.php | 5 +-- .../SamlAuthenticationSuccessHandlerTest.php | 5 +-- tests/Security/AclDecisionManagerTest.php | 5 +-- tests/Security/RolePermissionManagerTest.php | 5 +-- tests/Security/RoleServiceTest.php | 6 +-- tests/Security/SessionHandlerTest.php | 5 +-- tests/Security/UserCheckerTest.php | 5 +-- .../Calculator/BillableCalculatorTest.php | 10 ++--- .../Calculator/DurationCalculatorTest.php | 13 +++--- .../Calculator/RateCalculatorTest.php | 13 +++--- .../Calculator/RateResetCalculatorTest.php | 5 +-- tests/Timesheet/DateTimeFactoryTest.php | 14 +++---- tests/Timesheet/LockdownServiceTest.php | 14 +++---- tests/Timesheet/RateServiceTest.php | 13 +++--- tests/Timesheet/Rounding/CeilRoundingTest.php | 10 ++--- .../Rounding/ClosestRoundingTest.php | 10 ++--- .../Rounding/DefaultRoundingTest.php | 10 ++--- .../Timesheet/Rounding/FloorRoundingTest.php | 10 ++--- tests/Timesheet/RoundingServiceTest.php | 11 +++-- tests/Timesheet/TimesheetServiceTest.php | 14 +++---- .../AbstractTrackingModeTestCase.php | 5 +-- .../TrackingMode/DefaultModeTest.php | 5 +-- .../DurationFixedBeginModeTest.php | 5 +-- .../TrackingMode/PunchInOutModeTest.php | 5 +-- tests/Timesheet/TrackingModeServiceTest.php | 6 +-- tests/Timesheet/UtilTest.php | 10 ++--- tests/TranslationsTest.php | 5 +-- tests/Twig/ContextTest.php | 8 ++-- tests/Twig/DatatableExtensionsTest.php | 5 +-- tests/Twig/ExtensionsTest.php | 14 +++---- tests/Twig/LocaleFormatExtensionsTest.php | 41 ++++++------------- tests/Twig/PaginationExtensionTest.php | 5 +-- tests/Twig/Runtime/EncoreExtensionTest.php | 5 +-- tests/Twig/Runtime/MarkdownExtensionTest.php | 5 +-- .../Twig/Runtime/ThemeEventExtensionTest.php | 10 ++--- tests/Twig/Runtime/TimesheetExtensionTest.php | 5 +-- tests/Twig/Runtime/WidgetExtensionTest.php | 5 +-- tests/Twig/RuntimeExtensionsTest.php | 5 +-- tests/Utils/ColorTest.php | 5 +-- tests/Utils/DurationTest.php | 18 +++----- tests/Utils/FileHelperTest.php | 10 ++--- tests/Utils/FormFormatConverterTest.php | 10 ++--- tests/Utils/JavascriptFormatConverterTest.php | 5 +-- tests/Utils/MarkdownTest.php | 8 ++-- tests/Utils/MenuItemModelTest.php | 5 +-- tests/Utils/NumberGeneratorTest.php | 8 ++-- tests/Utils/PageSetupTest.php | 5 +-- tests/Utils/PaginationTest.php | 5 +-- tests/Utils/ParsedownExtensionTest.php | 8 ++-- tests/Utils/ParsedownTest.php | 5 +-- tests/Utils/ProfileManagerTest.php | 26 ++++-------- tests/Utils/SearchTermPartTest.php | 10 ++--- tests/Utils/SearchTermTest.php | 10 ++--- tests/Utils/StringHelperTest.php | 14 +++---- .../Constraints/ActivityValidatorTest.php | 5 ++- .../Constraints/ColorChoicesValidatorTest.php | 12 +++--- .../Constraints/CustomerValidatorTest.php | 5 ++- .../DateTimeFormatValidatorTest.php | 14 +++---- .../Constraints/DurationValidatorTest.php | 18 ++++---- .../ExportRendererValidatorTest.php | 14 +++---- .../Constraints/HexColorValidatorTest.php | 14 +++---- .../Constraints/ProjectValidatorTest.php | 5 ++- .../QuickEntryModelValidatorTest.php | 5 ++- .../QuickEntryTimesheetValidatorTest.php | 5 ++- .../Constraints/RoleNameValidatorTest.php | 14 +++---- .../Constraints/RoleValidatorTest.php | 14 +++---- .../Constraints/TeamValidatorTest.php | 5 ++- .../Constraints/TimeFormatValidatorTest.php | 14 +++---- .../Constraints/TimesheetBasicTest.php | 5 +-- .../TimesheetBasicValidatorTest.php | 10 ++--- .../Constraints/TimesheetBudgetUsedTest.php | 5 +-- .../TimesheetBudgetUsedValidatorTest.php | 10 ++--- .../Constraints/TimesheetDeactivatedTest.php | 5 +-- .../TimesheetDeactivatedValidatorTest.php | 5 ++- .../Constraints/TimesheetExportedTest.php | 5 +-- .../TimesheetExportedValidatorTest.php | 5 ++- .../Constraints/TimesheetFutureTimesTest.php | 5 +-- .../TimesheetFutureTimesValidatorTest.php | 5 ++- .../Constraints/TimesheetLockdownTest.php | 5 +-- .../TimesheetLockdownValidatorTest.php | 14 +++---- .../Constraints/TimesheetLongRunningTest.php | 5 +-- .../TimesheetLongRunningValidatorTest.php | 5 ++- .../TimesheetMultiUpdateValidatorTest.php | 5 ++- .../TimesheetMultiUserValidatorTest.php | 5 ++- .../TimesheetNegativeDurationTest.php | 5 +-- ...TimesheetNegativeDurationValidatorTest.php | 5 ++- .../Constraints/TimesheetOverlappingTest.php | 5 +-- .../TimesheetOverlappingValidatorTest.php | 5 ++- .../Constraints/TimesheetRestartTest.php | 5 +-- .../TimesheetRestartValidatorTest.php | 10 ++--- .../Constraints/TimesheetValidatorTest.php | 5 ++- .../Constraints/TimesheetZeroDurationTest.php | 5 +-- .../TimesheetZeroDurationValidatorTest.php | 5 ++- .../Constraints/UserValidatorTest.php | 5 ++- tests/Validator/ValidationExceptionTest.php | 5 +-- .../ValidationFailedExceptionTest.php | 5 +-- tests/Voter/ActivityVoterTest.php | 10 ++--- tests/Voter/CustomerVoterTest.php | 5 +-- tests/Voter/EntityMultiRoleVoterTest.php | 10 ++--- tests/Voter/ProjectVoterTest.php | 5 +-- tests/Voter/RolePermissionVoterTest.php | 10 ++--- tests/Voter/TeamVoterTest.php | 10 ++--- tests/Voter/TimesheetVoterTest.php | 10 ++--- tests/Voter/UserVoterTest.php | 14 +++---- tests/Webhook/Attribute/AsWebhookTestCase.php | 5 +-- tests/Widget/Type/AbstractWidgetTestCase.php | 5 +-- .../Type/AbstractWidgetTypeTestCase.php | 5 +-- tests/Widget/Type/ActiveUsersYearTest.php | 7 ++-- tests/Widget/Type/AmountMonthTest.php | 7 ++-- tests/Widget/Type/AmountTodayTest.php | 7 ++-- tests/Widget/Type/AmountTotalTest.php | 7 ++-- tests/Widget/Type/AmountWeekTest.php | 7 ++-- tests/Widget/Type/AmountYearTest.php | 7 ++-- .../Widget/Type/DailyWorkingTimeChartTest.php | 10 ++--- tests/Widget/Type/DurationYearTest.php | 7 ++-- tests/Widget/Type/MoreTest.php | 6 +-- .../Type/PaginatedWorkingTimeChartTest.php | 10 ++--- tests/Widget/Type/TotalsActivityTest.php | 5 +-- tests/Widget/Type/TotalsCustomerTest.php | 5 +-- tests/Widget/Type/TotalsProjectTest.php | 5 +-- tests/Widget/Type/TotalsUserTest.php | 5 +-- tests/Widget/Type/UserAmountMonthTest.php | 7 ++-- tests/Widget/Type/UserAmountTodayTest.php | 7 ++-- tests/Widget/Type/UserAmountTotalTest.php | 7 ++-- tests/Widget/Type/UserAmountWeekTest.php | 7 ++-- tests/Widget/Type/UserAmountYearTest.php | 7 ++-- tests/Widget/Type/UserDurationYearTest.php | 7 ++-- tests/Widget/WidgetExceptionTest.php | 5 +-- tests/Widget/WidgetServiceTest.php | 5 +-- .../WorkingTimeCalculatorDayTest.php | 5 +-- .../WorkingTimeCalculatorNoneTest.php | 5 +-- .../Mode/WorkingTimeModeDayTest.php | 5 +-- .../Mode/WorkingTimeModeFactoryTest.php | 5 +-- .../Mode/WorkingTimeModeNoneTest.php | 5 +-- .../Model/BoxConfigurationTest.php | 5 +-- tests/WorkingTime/Model/DayAddonTest.php | 5 +-- tests/WorkingTime/Model/DayTest.php | 5 +-- tests/WorkingTime/Model/MonthSummaryTest.php | 5 +-- tests/WorkingTime/Model/MonthTest.php | 5 +-- .../Model/YearPerUserSummaryTest.php | 5 +-- tests/WorkingTime/Model/YearSummaryTest.php | 5 +-- tests/WorkingTime/Model/YearTest.php | 5 +-- 599 files changed, 1778 insertions(+), 2313 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 325293e6..5113799f 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -62,7 +62,7 @@ jobs: run: APP_ENV=dev bin/console kimai:reload -n - name: Check codestyles - run: PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --verbose --config=.php-cs-fixer.dist.php --using-cache=no --show-progress=none --format=checkstyle | cs2pr + run: vendor/bin/php-cs-fixer fix --dry-run --verbose --config=.php-cs-fixer.dist.php --using-cache=no --show-progress=none --format=checkstyle | cs2pr - name: Run PHPStan for application run: vendor/bin/phpstan analyse -c phpstan.neon --no-progress --error-format=checkstyle | cs2pr diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 1001853a..deaeabf8 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -8,6 +8,7 @@ file that was distributed with this source code. COMMENT; $fixer = new PhpCsFixer\Config(); +$fixer->setUnsupportedPhpVersionAllowed(true); $fixer ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()) ->setRiskyAllowed(true) diff --git a/src/Customer/CustomerStatisticService.php b/src/Customer/CustomerStatisticService.php index 6ea48188..30e1e73d 100644 --- a/src/Customer/CustomerStatisticService.php +++ b/src/Customer/CustomerStatisticService.php @@ -19,7 +19,7 @@ use App\Timesheet\DateTimeFactory; use DateTimeImmutable; use DateTimeInterface; use Doctrine\DBAL\Types\Types; -use Doctrine\ORM\Query; +use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Psr\EventDispatcher\EventDispatcherInterface; @@ -112,7 +112,7 @@ class CustomerStatisticService $qb = $this->timesheetRepository->createQueryBuilder('t'); $qb ->select('IDENTITY(p.customer) AS id') - ->join(Project::class, 'p', Query\Expr\Join::WITH, 't.project = p.id') + ->join(Project::class, 'p', Join::WITH, 't.project = p.id') ->addSelect('COALESCE(SUM(t.duration), 0) as duration') ->addSelect('COALESCE(SUM(t.rate), 0) as rate') ->addSelect('COALESCE(SUM(t.internalRate), 0) as internalRate') diff --git a/src/Repository/ActivityRepository.php b/src/Repository/ActivityRepository.php index 45929e1a..68d4731f 100644 --- a/src/Repository/ActivityRepository.php +++ b/src/Repository/ActivityRepository.php @@ -33,7 +33,7 @@ use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository */ class ActivityRepository extends EntityRepository { diff --git a/src/Repository/CustomerRateRepository.php b/src/Repository/CustomerRateRepository.php index bc2202a7..a76d8f3b 100644 --- a/src/Repository/CustomerRateRepository.php +++ b/src/Repository/CustomerRateRepository.php @@ -14,7 +14,7 @@ use App\Entity\CustomerRate; use Doctrine\ORM\EntityRepository; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository */ class CustomerRateRepository extends EntityRepository { diff --git a/src/Repository/ExportTemplateRepository.php b/src/Repository/ExportTemplateRepository.php index ed7949ab..7f376da1 100644 --- a/src/Repository/ExportTemplateRepository.php +++ b/src/Repository/ExportTemplateRepository.php @@ -13,7 +13,7 @@ use App\Entity\ExportTemplate; use Doctrine\ORM\EntityRepository; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository */ class ExportTemplateRepository extends EntityRepository { diff --git a/src/Repository/InvoiceRepository.php b/src/Repository/InvoiceRepository.php index 946ab9e7..475b88ec 100644 --- a/src/Repository/InvoiceRepository.php +++ b/src/Repository/InvoiceRepository.php @@ -26,7 +26,7 @@ use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository */ class InvoiceRepository extends EntityRepository { diff --git a/src/Repository/InvoiceTemplateRepository.php b/src/Repository/InvoiceTemplateRepository.php index bcb7465c..c2369804 100644 --- a/src/Repository/InvoiceTemplateRepository.php +++ b/src/Repository/InvoiceTemplateRepository.php @@ -19,7 +19,7 @@ use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository */ class InvoiceTemplateRepository extends EntityRepository { diff --git a/src/Repository/ProjectRateRepository.php b/src/Repository/ProjectRateRepository.php index a7966cee..bd8ea4ca 100644 --- a/src/Repository/ProjectRateRepository.php +++ b/src/Repository/ProjectRateRepository.php @@ -14,7 +14,7 @@ use App\Entity\ProjectRate; use Doctrine\ORM\EntityRepository; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository */ class ProjectRateRepository extends EntityRepository { diff --git a/src/Repository/ProjectRepository.php b/src/Repository/ProjectRepository.php index 53c33a7e..00e221ec 100644 --- a/src/Repository/ProjectRepository.php +++ b/src/Repository/ProjectRepository.php @@ -36,7 +36,7 @@ use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository */ class ProjectRepository extends EntityRepository { diff --git a/src/Repository/RolePermissionRepository.php b/src/Repository/RolePermissionRepository.php index d3623d2f..d08f9cc9 100644 --- a/src/Repository/RolePermissionRepository.php +++ b/src/Repository/RolePermissionRepository.php @@ -14,7 +14,7 @@ use App\Entity\RolePermission; use Doctrine\ORM\EntityRepository; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository */ class RolePermissionRepository extends EntityRepository { diff --git a/src/Repository/RoleRepository.php b/src/Repository/RoleRepository.php index 379b1424..e5f16c87 100644 --- a/src/Repository/RoleRepository.php +++ b/src/Repository/RoleRepository.php @@ -14,7 +14,7 @@ use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Exception\ORMException; /** - * @extends \Doctrine\ORM\EntityRepository + * @extends EntityRepository * @method Role[] findAll() */ class RoleRepository extends EntityRepository diff --git a/src/Validator/Constraints/TimesheetLongRunningValidator.php b/src/Validator/Constraints/TimesheetLongRunningValidator.php index 97cf5acf..18dba864 100644 --- a/src/Validator/Constraints/TimesheetLongRunningValidator.php +++ b/src/Validator/Constraints/TimesheetLongRunningValidator.php @@ -11,6 +11,7 @@ namespace App\Validator\Constraints; use App\Configuration\SystemConfiguration; use App\Entity\Timesheet as TimesheetEntity; +use App\Utils\Duration; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; @@ -64,7 +65,7 @@ final class TimesheetLongRunningValidator extends ConstraintValidator return; } - $format = new \App\Utils\Duration(); + $format = new Duration(); $hours = $format->format($maxMinutes * 60); $this->context->buildViolation($constraint->message) diff --git a/tests/API/ActionsControllerTest.php b/tests/API/ActionsControllerTest.php index 9f28a6cc..9a1652b7 100644 --- a/tests/API/ActionsControllerTest.php +++ b/tests/API/ActionsControllerTest.php @@ -14,10 +14,9 @@ use App\Tests\DataFixtures\ActivityFixtures; use App\Tests\DataFixtures\CustomerFixtures; use App\Tests\DataFixtures\ProjectFixtures; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class ActionsControllerTest extends APIControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/API/ActivityControllerTest.php b/tests/API/ActivityControllerTest.php index 7addc43a..a7f3f742 100644 --- a/tests/API/ActivityControllerTest.php +++ b/tests/API/ActivityControllerTest.php @@ -21,13 +21,13 @@ use App\Repository\ActivityRateRepository; use App\Repository\ActivityRepository; use App\Repository\Query\VisibilityInterface; use App\Tests\Mocks\ActivityTestMetaFieldSubscriberMock; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -/** - * @group integration - */ +#[Group('integration')] class ActivityControllerTest extends APIControllerBaseTestCase { use RateControllerTestTrait; @@ -140,9 +140,7 @@ class ActivityControllerTest extends APIControllerBaseTestCase return [$project, $project2, $activity1]; } - /** - * @dataProvider getCollectionTestData - */ + #[DataProvider('getCollectionTestData')] public function testGetCollection($url, $project, $parameters, $expected): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_USER); diff --git a/tests/API/ApiDocControllerTest.php b/tests/API/ApiDocControllerTest.php index f7e53802..30a2cb2e 100644 --- a/tests/API/ApiDocControllerTest.php +++ b/tests/API/ApiDocControllerTest.php @@ -11,10 +11,9 @@ namespace App\Tests\API; use App\Entity\User; use App\Tests\Controller\AbstractControllerBaseTestCase; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class ApiDocControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/API/Authentication/AccessTokenHandlerTest.php b/tests/API/Authentication/AccessTokenHandlerTest.php index c065bbf5..a141132b 100644 --- a/tests/API/Authentication/AccessTokenHandlerTest.php +++ b/tests/API/Authentication/AccessTokenHandlerTest.php @@ -13,12 +13,11 @@ use App\API\Authentication\AccessTokenHandler; use App\Entity\AccessToken; use App\Entity\User; use App\Repository\AccessTokenRepository; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\Security\Core\Exception\BadCredentialsException; -/** - * @covers \App\API\Authentication\AccessTokenHandler - */ +#[CoversClass(AccessTokenHandler::class)] class AccessTokenHandlerTest extends TestCase { private function getSut(?AccessToken $accessToken = null): AccessTokenHandler diff --git a/tests/API/Authentication/TokenAuthenticatorTest.php b/tests/API/Authentication/TokenAuthenticatorTest.php index 826a07ea..4689adc7 100644 --- a/tests/API/Authentication/TokenAuthenticatorTest.php +++ b/tests/API/Authentication/TokenAuthenticatorTest.php @@ -12,6 +12,8 @@ namespace App\Tests\API\Authentication; use App\API\Authentication\TokenAuthenticator; use App\Entity\User; use App\Repository\ApiUserRepository; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; @@ -21,10 +23,8 @@ use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationExc use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\CustomCredentials; -/** - * @covers \App\API\Authentication\TokenAuthenticator - * @group legacy - */ +#[CoversClass(TokenAuthenticator::class)] +#[Group('legacy')] class TokenAuthenticatorTest extends TestCase { private function getSut(bool $verify = true): TokenAuthenticator diff --git a/tests/API/AuthenticationTest.php b/tests/API/AuthenticationTest.php index 8cb2150f..48588450 100644 --- a/tests/API/AuthenticationTest.php +++ b/tests/API/AuthenticationTest.php @@ -11,14 +11,14 @@ namespace App\Tests\API; use App\DataFixtures\UserFixtures; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Response; /** - * These tests make sure, that the deprecated API login with X-AUTH-USER and X-AUTH-TOKEN still works. - * - * @group legacy - * @group integration + * Make sure that the deprecated API login with X-AUTH-USER and X-AUTH-TOKEN still works. */ +#[Group('legacy')] +#[Group('integration')] class AuthenticationTest extends APIControllerBaseTestCase { public function testPinIsSecure(): void diff --git a/tests/API/ConfigurationControllerTest.php b/tests/API/ConfigurationControllerTest.php index 7ecb9d45..4f66a0a6 100644 --- a/tests/API/ConfigurationControllerTest.php +++ b/tests/API/ConfigurationControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\API; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class ConfigurationControllerTest extends APIControllerBaseTestCase { public function testIsTimesheetSecure(): void diff --git a/tests/API/CustomerControllerTest.php b/tests/API/CustomerControllerTest.php index 8f1b2909..2535f40c 100644 --- a/tests/API/CustomerControllerTest.php +++ b/tests/API/CustomerControllerTest.php @@ -21,13 +21,12 @@ use App\Entity\User; use App\Repository\CustomerRateRepository; use App\Repository\CustomerRepository; use App\Tests\Mocks\CustomerTestMetaFieldSubscriberMock; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -/** - * @group integration - */ +#[Group('integration')] class CustomerControllerTest extends APIControllerBaseTestCase { use RateControllerTestTrait; diff --git a/tests/API/ExportControllerTest.php b/tests/API/ExportControllerTest.php index c9a793e6..822585be 100644 --- a/tests/API/ExportControllerTest.php +++ b/tests/API/ExportControllerTest.php @@ -12,12 +12,11 @@ namespace App\Tests\API; use App\Entity\ExportTemplate; use App\Entity\User; use App\Repository\ExportTemplateRepository; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -/** - * @group integration - */ +#[Group('integration')] class ExportControllerTest extends APIControllerBaseTestCase { private function importExportTemplate(): ExportTemplate diff --git a/tests/API/InvoiceControllerTest.php b/tests/API/InvoiceControllerTest.php index d563af0d..e83b2d8b 100644 --- a/tests/API/InvoiceControllerTest.php +++ b/tests/API/InvoiceControllerTest.php @@ -12,10 +12,9 @@ namespace App\Tests\API; use App\Entity\Invoice; use App\Entity\User; use App\Tests\DataFixtures\InvoiceFixtures; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class InvoiceControllerTest extends APIControllerBaseTestCase { /** diff --git a/tests/API/Model/PageActionTest.php b/tests/API/Model/PageActionTest.php index 1b6f4ed2..088c9778 100644 --- a/tests/API/Model/PageActionTest.php +++ b/tests/API/Model/PageActionTest.php @@ -10,11 +10,10 @@ namespace App\Tests\API\Model; use App\API\Model\PageAction; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\API\Model\PageAction - */ +#[CoversClass(PageAction::class)] class PageActionTest extends TestCase { public function testEmptySettings(): void diff --git a/tests/API/Model/TimesheetConfigTest.php b/tests/API/Model/TimesheetConfigTest.php index 0f16218d..304ddad8 100644 --- a/tests/API/Model/TimesheetConfigTest.php +++ b/tests/API/Model/TimesheetConfigTest.php @@ -10,11 +10,10 @@ namespace App\Tests\API\Model; use App\API\Model\TimesheetConfig; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\API\Model\TimesheetConfig - */ +#[CoversClass(TimesheetConfig::class)] class TimesheetConfigTest extends TestCase { public function testSetter(): void diff --git a/tests/API/Model/VersionTest.php b/tests/API/Model/VersionTest.php index e8c1949a..70725f6e 100644 --- a/tests/API/Model/VersionTest.php +++ b/tests/API/Model/VersionTest.php @@ -11,11 +11,10 @@ namespace App\Tests\API\Model; use App\API\Model\Version; use App\Constants; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\API\Model\Version - */ +#[CoversClass(Version::class)] class VersionTest extends TestCase { public function testValues(): void diff --git a/tests/API/NotFoundExceptionTest.php b/tests/API/NotFoundExceptionTest.php index c668abdb..50bf37aa 100644 --- a/tests/API/NotFoundExceptionTest.php +++ b/tests/API/NotFoundExceptionTest.php @@ -10,11 +10,10 @@ namespace App\Tests\API; use App\API\NotFoundException; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\API\NotFoundException - */ +#[CoversClass(NotFoundException::class)] class NotFoundExceptionTest extends TestCase { public function testConstructor(): void diff --git a/tests/API/ProjectControllerTest.php b/tests/API/ProjectControllerTest.php index f06b545d..15eec1e8 100644 --- a/tests/API/ProjectControllerTest.php +++ b/tests/API/ProjectControllerTest.php @@ -21,13 +21,13 @@ use App\Repository\ProjectRateRepository; use App\Repository\ProjectRepository; use App\Repository\Query\VisibilityInterface; use App\Tests\Mocks\ProjectTestMetaFieldSubscriberMock; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -/** - * @group integration - */ +#[Group('integration')] class ProjectControllerTest extends APIControllerBaseTestCase { use RateControllerTestTrait; @@ -191,9 +191,7 @@ class ProjectControllerTest extends APIControllerBaseTestCase ]; } - /** - * @dataProvider getCollectionTestData - */ + #[DataProvider('getCollectionTestData')] public function testGetCollectionWithParams(string $url, ?int $project, array $parameters, array $expected): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_USER); diff --git a/tests/API/Serializer/ValidationFailedExceptionErrorHandlerTest.php b/tests/API/Serializer/ValidationFailedExceptionErrorHandlerTest.php index 8f396175..519abe3e 100644 --- a/tests/API/Serializer/ValidationFailedExceptionErrorHandlerTest.php +++ b/tests/API/Serializer/ValidationFailedExceptionErrorHandlerTest.php @@ -15,6 +15,7 @@ use FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler; use JMS\Serializer\GraphNavigatorInterface; use JMS\Serializer\JsonSerializationVisitor; use JMS\Serializer\SerializationContext; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Bundle\SecurityBundle\Security; use Symfony\Component\ErrorHandler\Exception\FlattenException; @@ -22,9 +23,7 @@ use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Contracts\Translation\TranslatorInterface; -/** - * @covers \App\API\Serializer\ValidationFailedExceptionErrorHandler - */ +#[CoversClass(ValidationFailedExceptionErrorHandler::class)] class ValidationFailedExceptionErrorHandlerTest extends TestCase { public function testSubscribingMethods(): void diff --git a/tests/API/StatusControllerTest.php b/tests/API/StatusControllerTest.php index 92c87b72..78a5b02c 100644 --- a/tests/API/StatusControllerTest.php +++ b/tests/API/StatusControllerTest.php @@ -11,10 +11,9 @@ namespace App\Tests\API; use App\Constants; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class StatusControllerTest extends APIControllerBaseTestCase { public function testIsSecurePing(): void diff --git a/tests/API/TagControllerTest.php b/tests/API/TagControllerTest.php index 2d604203..9a681401 100644 --- a/tests/API/TagControllerTest.php +++ b/tests/API/TagControllerTest.php @@ -12,11 +12,10 @@ namespace App\Tests\API; use App\Entity\Tag; use App\Entity\User; use App\Tests\DataFixtures\TagFixtures; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Response; -/** - * @group integration - */ +#[Group('integration')] class TagControllerTest extends APIControllerBaseTestCase { /** diff --git a/tests/API/TeamControllerTest.php b/tests/API/TeamControllerTest.php index 9e1d6ec8..bdea035e 100644 --- a/tests/API/TeamControllerTest.php +++ b/tests/API/TeamControllerTest.php @@ -13,11 +13,11 @@ use App\Entity\Team; use App\Entity\User; use App\Tests\DataFixtures\TeamFixtures; use Doctrine\ORM\EntityManager; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Response; -/** - * @group integration - */ +#[Group('integration')] class TeamControllerTest extends APIControllerBaseTestCase { /** @@ -47,9 +47,7 @@ class TeamControllerTest extends APIControllerBaseTestCase ]; } - /** - * @dataProvider getRoleTestData - */ + #[DataProvider('getRoleTestData')] public function testIsSecureForRole(string $role): void { $this->assertUrlIsSecuredForRole($role, '/api/teams'); diff --git a/tests/API/TimesheetControllerTest.php b/tests/API/TimesheetControllerTest.php index 2ca935ba..13028a3a 100644 --- a/tests/API/TimesheetControllerTest.php +++ b/tests/API/TimesheetControllerTest.php @@ -20,12 +20,12 @@ use App\Entity\User; use App\Tests\DataFixtures\TimesheetFixtures; use App\Tests\Mocks\TimesheetTestMetaFieldSubscriberMock; use App\Timesheet\DateTimeFactory; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Response; -/** - * @group integration - */ +#[Group('integration')] class TimesheetControllerTest extends APIControllerBaseTestCase { public const DATE_FORMAT = 'Y-m-d H:i:s'; @@ -779,9 +779,7 @@ class TimesheetControllerTest extends APIControllerBaseTestCase ]; } - /** - * @dataProvider getTrackingModeTestData - */ + #[DataProvider('getTrackingModeTestData')] public function testCreateActionWithTrackingModeHasFieldsForUser(string $trackingMode, string $user, bool $showTimes): void { $dateTime = new DateTimeFactory(new \DateTimeZone(self::TEST_TIMEZONE)); diff --git a/tests/API/UserControllerTest.php b/tests/API/UserControllerTest.php index 40636601..1817d244 100644 --- a/tests/API/UserControllerTest.php +++ b/tests/API/UserControllerTest.php @@ -10,10 +10,10 @@ namespace App\Tests\API; use App\Entity\User; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class UserControllerTest extends APIControllerBaseTestCase { public function testIsSecure(): void @@ -33,9 +33,7 @@ class UserControllerTest extends APIControllerBaseTestCase ]; } - /** - * @dataProvider getRoleTestData - */ + #[DataProvider('getRoleTestData')] public function testIsSecureForRole(string $role): void { $this->assertUrlIsSecuredForRole($role, '/api/users'); diff --git a/tests/Activity/ActivityServiceTest.php b/tests/Activity/ActivityServiceTest.php index 2412dd84..1eaf5688 100644 --- a/tests/Activity/ActivityServiceTest.php +++ b/tests/Activity/ActivityServiceTest.php @@ -21,15 +21,15 @@ use App\Event\ActivityUpdatePreEvent; use App\Repository\ActivityRepository; use App\Tests\Mocks\SystemConfigurationFactory; use App\Validator\ValidationFailedException; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\Validator\ValidatorInterface; -/** - * @covers \App\Activity\ActivityService - */ +#[CoversClass(ActivityService::class)] class ActivityServiceTest extends TestCase { private function getSut( @@ -144,9 +144,7 @@ class ActivityServiceTest extends TestCase self::assertNull($project->getProject()); } - /** - * @dataProvider getTestData - */ + #[DataProvider('getTestData')] public function testActivityNumber(string $format, int|string $expected): void { $sut = $this->getSut(null, null, null, ['number_format' => $format]); diff --git a/tests/Calendar/CalendarSourceTest.php b/tests/Calendar/CalendarSourceTest.php index 45a0c5d6..2b8d3585 100644 --- a/tests/Calendar/CalendarSourceTest.php +++ b/tests/Calendar/CalendarSourceTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Calendar; use App\Calendar\CalendarSource; use App\Calendar\CalendarSourceType; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Calendar\CalendarSource - */ +#[CoversClass(CalendarSource::class)] class CalendarSourceTest extends TestCase { public function testSource(): void diff --git a/tests/Calendar/GoogleSourceTest.php b/tests/Calendar/GoogleSourceTest.php index 2c500704..30937d00 100644 --- a/tests/Calendar/GoogleSourceTest.php +++ b/tests/Calendar/GoogleSourceTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Calendar; use App\Calendar\GoogleSource; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Calendar\GoogleSource - */ +#[CoversClass(GoogleSource::class)] class GoogleSourceTest extends TestCase { public function testConstruct(): void diff --git a/tests/Calendar/GoogleTest.php b/tests/Calendar/GoogleTest.php index 70c7ebb3..c3be36b5 100644 --- a/tests/Calendar/GoogleTest.php +++ b/tests/Calendar/GoogleTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Calendar; use App\Calendar\Google; use App\Calendar\GoogleSource; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Calendar\Google - */ +#[CoversClass(Google::class)] class GoogleTest extends TestCase { public function testConstruct(): void diff --git a/tests/Calendar/RecentActivitiesSourceTest.php b/tests/Calendar/RecentActivitiesSourceTest.php index 41315f83..accfb025 100644 --- a/tests/Calendar/RecentActivitiesSourceTest.php +++ b/tests/Calendar/RecentActivitiesSourceTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Calendar; use App\Calendar\RecentActivitiesSource; use App\Calendar\TimesheetEntry; use App\Entity\Timesheet; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Calendar\RecentActivitiesSource - */ +#[CoversClass(RecentActivitiesSource::class)] class RecentActivitiesSourceTest extends TestCase { public function testConstruct(): void diff --git a/tests/Calendar/TimesheetEntryTest.php b/tests/Calendar/TimesheetEntryTest.php index 44dcbd98..67f43112 100644 --- a/tests/Calendar/TimesheetEntryTest.php +++ b/tests/Calendar/TimesheetEntryTest.php @@ -14,11 +14,10 @@ use App\Entity\Activity; use App\Entity\Project; use App\Entity\Tag; use App\Entity\Timesheet; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Calendar\TimesheetEntry - */ +#[CoversClass(TimesheetEntry::class)] class TimesheetEntryTest extends TestCase { public function testConstruct(): void diff --git a/tests/Command/ActivateUserCommandTest.php b/tests/Command/ActivateUserCommandTest.php index e79becac..2871fc18 100644 --- a/tests/Command/ActivateUserCommandTest.php +++ b/tests/Command/ActivateUserCommandTest.php @@ -14,15 +14,15 @@ use App\Entity\User; use App\Repository\UserRepository; use App\User\UserService; use Doctrine\Bundle\DoctrineBundle\Registry; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\ActivateUserCommand - * @group integration - */ +#[CoversClass(ActivateUserCommand::class)] +#[Group('integration')] class ActivateUserCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/BundleInstallerCommandTest.php b/tests/Command/BundleInstallerCommandTest.php index f31da074..64441f7d 100644 --- a/tests/Command/BundleInstallerCommandTest.php +++ b/tests/Command/BundleInstallerCommandTest.php @@ -10,6 +10,8 @@ namespace App\Tests\Command; use App\Command\AbstractBundleInstallerCommand; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Command\Command; @@ -18,10 +20,8 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\AbstractBundleInstallerCommand - * @group integration - */ +#[CoversClass(AbstractBundleInstallerCommand::class)] +#[Group('integration')] class BundleInstallerCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/ChangePasswordCommandTest.php b/tests/Command/ChangePasswordCommandTest.php index 971ab3cc..36a97245 100644 --- a/tests/Command/ChangePasswordCommandTest.php +++ b/tests/Command/ChangePasswordCommandTest.php @@ -9,22 +9,23 @@ namespace App\Tests\Command; +use App\Command\AbstractUserCommand; use App\Command\ChangePasswordCommand; use App\Entity\User; use App\Repository\UserRepository; use App\User\UserService; use Doctrine\Bundle\DoctrineBundle\Registry; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -/** - * @covers \App\Command\ChangePasswordCommand - * @covers \App\Command\AbstractUserCommand - * @group integration - */ +#[CoversClass(ChangePasswordCommand::class)] +#[CoversClass(AbstractUserCommand::class)] +#[Group('integration')] class ChangePasswordCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/CreateUserCommandTest.php b/tests/Command/CreateUserCommandTest.php index a263b321..836158f6 100644 --- a/tests/Command/CreateUserCommandTest.php +++ b/tests/Command/CreateUserCommandTest.php @@ -14,14 +14,14 @@ use App\Entity\User; use App\Repository\UserRepository; use App\User\UserService; use Doctrine\Bundle\DoctrineBundle\Registry; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\CreateUserCommand - * @group integration - */ +#[CoversClass(CreateUserCommand::class)] +#[Group('integration')] class CreateUserCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/DeactivateUserCommandTest.php b/tests/Command/DeactivateUserCommandTest.php index 0a28ca90..cf6f065a 100644 --- a/tests/Command/DeactivateUserCommandTest.php +++ b/tests/Command/DeactivateUserCommandTest.php @@ -14,15 +14,15 @@ use App\Entity\User; use App\Repository\UserRepository; use App\User\UserService; use Doctrine\Bundle\DoctrineBundle\Registry; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\DeactivateUserCommand - * @group integration - */ +#[CoversClass(DeactivateUserCommand::class)] +#[Group('integration')] class DeactivateUserCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/DemoteUserCommandTest.php b/tests/Command/DemoteUserCommandTest.php index 83896fc4..cef7eead 100644 --- a/tests/Command/DemoteUserCommandTest.php +++ b/tests/Command/DemoteUserCommandTest.php @@ -9,21 +9,22 @@ namespace App\Tests\Command; +use App\Command\AbstractRoleCommand; use App\Command\DemoteUserCommand; use App\Entity\User; use App\Repository\UserRepository; use App\User\UserService; use Doctrine\Bundle\DoctrineBundle\Registry; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\AbstractRoleCommand - * @covers \App\Command\DemoteUserCommand - * @group integration - */ +#[CoversClass(AbstractRoleCommand::class)] +#[CoversClass(DemoteUserCommand::class)] +#[Group('integration')] class DemoteUserCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/ExportCreateCommandTest.php b/tests/Command/ExportCreateCommandTest.php index a06368e7..ce74ccc2 100644 --- a/tests/Command/ExportCreateCommandTest.php +++ b/tests/Command/ExportCreateCommandTest.php @@ -23,16 +23,16 @@ use App\Tests\DataFixtures\CustomerFixtures; use App\Tests\DataFixtures\ProjectFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\Tests\KernelTestTrait; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Mailer\MailerInterface; use Symfony\Contracts\Translation\TranslatorInterface; -/** - * @covers \App\Command\ExportCreateCommand - * @group integration - */ +#[CoversClass(ExportCreateCommand::class)] +#[Group('integration')] class ExportCreateCommandTest extends KernelTestCase { use KernelTestTrait; diff --git a/tests/Command/InstallCommandTest.php b/tests/Command/InstallCommandTest.php index 163c4cb3..47e8dd27 100644 --- a/tests/Command/InstallCommandTest.php +++ b/tests/Command/InstallCommandTest.php @@ -11,13 +11,13 @@ namespace App\Tests\Command; use App\Command\InstallCommand; use Doctrine\Bundle\DoctrineBundle\Registry; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; -/** - * @covers \App\Command\InstallCommand - * @group integration - */ +#[CoversClass(InstallCommand::class)] +#[Group('integration')] class InstallCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/InvoiceCreateCommandTest.php b/tests/Command/InvoiceCreateCommandTest.php index c88295e4..532c2a93 100644 --- a/tests/Command/InvoiceCreateCommandTest.php +++ b/tests/Command/InvoiceCreateCommandTest.php @@ -23,14 +23,14 @@ use App\Tests\DataFixtures\InvoiceTemplateFixtures; use App\Tests\DataFixtures\ProjectFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\Tests\KernelTestTrait; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\InvoiceCreateCommand - * @group integration - */ +#[CoversClass(InvoiceCreateCommand::class)] +#[Group('integration')] class InvoiceCreateCommandTest extends KernelTestCase { use KernelTestTrait; diff --git a/tests/Command/ListUserCommandTest.php b/tests/Command/ListUserCommandTest.php index b20f1ad2..02ad59f3 100644 --- a/tests/Command/ListUserCommandTest.php +++ b/tests/Command/ListUserCommandTest.php @@ -11,14 +11,14 @@ namespace App\Tests\Command; use App\Command\ListUserCommand; use App\Repository\UserRepository; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\ListUserCommand - * @group integration - */ +#[CoversClass(ListUserCommand::class)] +#[Group('integration')] class ListUserCommandTest extends KernelTestCase { public function testWithPlugins(): void diff --git a/tests/Command/MailTestCommandTest.php b/tests/Command/MailTestCommandTest.php index df5b56f5..1b425afb 100644 --- a/tests/Command/MailTestCommandTest.php +++ b/tests/Command/MailTestCommandTest.php @@ -10,14 +10,14 @@ namespace App\Tests\Command; use App\Command\MailTestCommand; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; -/** - * @covers \App\Command\MailTestCommand - * @group integration - */ +#[CoversClass(MailTestCommand::class)] +#[Group('integration')] class MailTestCommandTest extends KernelTestCase { protected Application $application; diff --git a/tests/Command/PluginCommandTest.php b/tests/Command/PluginCommandTest.php index c138a061..b76ddd91 100644 --- a/tests/Command/PluginCommandTest.php +++ b/tests/Command/PluginCommandTest.php @@ -13,14 +13,14 @@ use App\Command\PluginCommand; use App\Plugin\PackageManager; use App\Plugin\PluginInterface; use App\Plugin\PluginManager; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\PluginCommand - * @group integration - */ +#[CoversClass(PluginCommand::class)] +#[Group('integration')] class PluginCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/PromoteUserCommandTest.php b/tests/Command/PromoteUserCommandTest.php index af873ff3..3a842916 100644 --- a/tests/Command/PromoteUserCommandTest.php +++ b/tests/Command/PromoteUserCommandTest.php @@ -9,21 +9,22 @@ namespace App\Tests\Command; +use App\Command\AbstractRoleCommand; use App\Command\PromoteUserCommand; use App\Entity\User; use App\Repository\UserRepository; use App\User\UserService; use Doctrine\Bundle\DoctrineBundle\Registry; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\AbstractRoleCommand - * @covers \App\Command\PromoteUserCommand - * @group integration - */ +#[CoversClass(AbstractRoleCommand::class)] +#[CoversClass(PromoteUserCommand::class)] +#[Group('integration')] class PromoteUserCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/ReloadCommandTest.php b/tests/Command/ReloadCommandTest.php index 4a905ec1..6e75489b 100644 --- a/tests/Command/ReloadCommandTest.php +++ b/tests/Command/ReloadCommandTest.php @@ -10,13 +10,13 @@ namespace App\Tests\Command; use App\Command\ReloadCommand; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; -/** - * @covers \App\Command\ReloadCommand - * @group integration - */ +#[CoversClass(ReloadCommand::class)] +#[Group('integration')] class ReloadCommandTest extends KernelTestCase { protected Application $application; diff --git a/tests/Command/ResetDevelopmentCommandTest.php b/tests/Command/ResetDevelopmentCommandTest.php index 9190dca2..eaebd505 100644 --- a/tests/Command/ResetDevelopmentCommandTest.php +++ b/tests/Command/ResetDevelopmentCommandTest.php @@ -10,13 +10,13 @@ namespace App\Tests\Command; use App\Command\ResetDevelopmentCommand; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; -/** - * @covers \App\Command\ResetDevelopmentCommand - * @group integration - */ +#[CoversClass(ResetDevelopmentCommand::class)] +#[Group('integration')] class ResetDevelopmentCommandTest extends KernelTestCase { public function testCommandName(): void diff --git a/tests/Command/ResetTestCommandTest.php b/tests/Command/ResetTestCommandTest.php index ef2188a0..cc20d1cb 100644 --- a/tests/Command/ResetTestCommandTest.php +++ b/tests/Command/ResetTestCommandTest.php @@ -11,14 +11,14 @@ namespace App\Tests\Command; use App\Command\ResetTestCommand; use Doctrine\ORM\EntityManagerInterface; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; -/** - * @covers \App\Command\ResetTestCommand - * @group integration - */ +#[CoversClass(ResetTestCommand::class)] +#[Group('integration')] class ResetTestCommandTest extends KernelTestCase { public function testCommandName(): void diff --git a/tests/Command/TimesheetStopAllCommandTest.php b/tests/Command/TimesheetStopAllCommandTest.php index fc42f09a..5337b19d 100644 --- a/tests/Command/TimesheetStopAllCommandTest.php +++ b/tests/Command/TimesheetStopAllCommandTest.php @@ -11,14 +11,14 @@ namespace App\Tests\Command; use App\Command\TimesheetStopAllCommand; use App\Tests\Mocks\TimesheetServiceFactory; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\TimesheetStopAllCommand - * @group integration - */ +#[CoversClass(TimesheetStopAllCommand::class)] +#[Group('integration')] class TimesheetStopAllCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/UserLoginLinkCommandTest.php b/tests/Command/UserLoginLinkCommandTest.php index 541b0014..a90eb427 100644 --- a/tests/Command/UserLoginLinkCommandTest.php +++ b/tests/Command/UserLoginLinkCommandTest.php @@ -11,15 +11,15 @@ namespace App\Tests\Command; use App\Command\UserLoginLinkCommand; use App\Repository\UserRepository; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Security\Http\LoginLink\LoginLinkHandlerInterface; -/** - * @covers \App\Command\UserLoginLinkCommand - * @group integration - */ +#[CoversClass(UserLoginLinkCommand::class)] +#[Group('integration')] class UserLoginLinkCommandTest extends KernelTestCase { private Application $application; diff --git a/tests/Command/VersionCommandTest.php b/tests/Command/VersionCommandTest.php index 05f686d3..4805bd58 100644 --- a/tests/Command/VersionCommandTest.php +++ b/tests/Command/VersionCommandTest.php @@ -11,14 +11,15 @@ namespace App\Tests\Command; use App\Command\VersionCommand; use App\Constants; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Tester\CommandTester; -/** - * @covers \App\Command\VersionCommand - * @group integration - */ +#[CoversClass(VersionCommand::class)] +#[Group('integration')] class VersionCommandTest extends KernelTestCase { private Application $application; @@ -32,9 +33,7 @@ class VersionCommandTest extends KernelTestCase $this->application->add(new VersionCommand()); } - /** - * @dataProvider getTestData - */ + #[DataProvider('getTestData')] public function testVersion(array $options, $result): void { $commandTester = $this->getCommandTester($options); diff --git a/tests/Configuration/LdapConfigurationTest.php b/tests/Configuration/LdapConfigurationTest.php index 1c1ae76b..96b49251 100644 --- a/tests/Configuration/LdapConfigurationTest.php +++ b/tests/Configuration/LdapConfigurationTest.php @@ -10,13 +10,13 @@ namespace App\Tests\Configuration; use App\Configuration\LdapConfiguration; +use App\Configuration\SystemConfiguration; use App\Tests\Mocks\SystemConfigurationFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Configuration\LdapConfiguration - * @covers \App\Configuration\SystemConfiguration - */ +#[CoversClass(LdapConfiguration::class)] +#[CoversClass(SystemConfiguration::class)] class LdapConfigurationTest extends TestCase { protected function getSut(array $settings) diff --git a/tests/Configuration/LocaleServiceTest.php b/tests/Configuration/LocaleServiceTest.php index 094ee93c..d8fc395e 100644 --- a/tests/Configuration/LocaleServiceTest.php +++ b/tests/Configuration/LocaleServiceTest.php @@ -10,11 +10,11 @@ namespace App\Tests\Configuration; use App\Configuration\LocaleService; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Configuration\LocaleService - */ +#[CoversClass(LocaleService::class)] class LocaleServiceTest extends TestCase { protected function getSut(array $settings): LocaleService @@ -146,9 +146,7 @@ class LocaleServiceTest extends TestCase self::assertEquals('H:i:s', $sut->getTimeFormat('en')); } - /** - * @dataProvider getNearestTranslationLocaleData - */ + #[DataProvider('getNearestTranslationLocaleData')] public function testGetNearestTranslationLocale(string $locale, string $expected): void { $sut = $this->getSut($this->getDefaultSettings()); diff --git a/tests/Configuration/MailConfigurationTest.php b/tests/Configuration/MailConfigurationTest.php index 5236d32f..78e50ae3 100644 --- a/tests/Configuration/MailConfigurationTest.php +++ b/tests/Configuration/MailConfigurationTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Configuration; use App\Configuration\MailConfiguration; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Configuration\MailConfiguration - */ +#[CoversClass(MailConfiguration::class)] class MailConfigurationTest extends TestCase { public function testGetFromAddress(): void diff --git a/tests/Configuration/SamlConfigurationTest.php b/tests/Configuration/SamlConfigurationTest.php index 013b2e73..2b485fe7 100644 --- a/tests/Configuration/SamlConfigurationTest.php +++ b/tests/Configuration/SamlConfigurationTest.php @@ -10,13 +10,13 @@ namespace App\Tests\Configuration; use App\Configuration\SamlConfiguration; +use App\Configuration\SystemConfiguration; use App\Tests\Mocks\SystemConfigurationFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Configuration\SamlConfiguration - * @covers \App\Configuration\SystemConfiguration - */ +#[CoversClass(SamlConfiguration::class)] +#[CoversClass(SystemConfiguration::class)] class SamlConfigurationTest extends TestCase { protected function getSut(array $settings) diff --git a/tests/Configuration/SystemConfigurationTest.php b/tests/Configuration/SystemConfigurationTest.php index 618990e9..c1382bb2 100644 --- a/tests/Configuration/SystemConfigurationTest.php +++ b/tests/Configuration/SystemConfigurationTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Configuration; use App\Configuration\SystemConfiguration; use App\Entity\Configuration; use App\Tests\Mocks\SystemConfigurationFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Configuration\SystemConfiguration - */ +#[CoversClass(SystemConfiguration::class)] class SystemConfigurationTest extends TestCase { /** diff --git a/tests/ConsoleApplicationTest.php b/tests/ConsoleApplicationTest.php index bbddb036..1aec120a 100644 --- a/tests/ConsoleApplicationTest.php +++ b/tests/ConsoleApplicationTest.php @@ -11,12 +11,11 @@ namespace App\Tests; use App\ConsoleApplication; use App\Constants; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpKernel\KernelInterface; -/** - * @covers \App\ConsoleApplication - */ +#[CoversClass(ConsoleApplication::class)] class ConsoleApplicationTest extends TestCase { public function testVersion(): void diff --git a/tests/ConstantsTest.php b/tests/ConstantsTest.php index cbef01ed..a3737a7d 100644 --- a/tests/ConstantsTest.php +++ b/tests/ConstantsTest.php @@ -10,11 +10,10 @@ namespace App\Tests; use App\Constants; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Constants - */ +#[CoversClass(Constants::class)] class ConstantsTest extends TestCase { public function testBuild(): void diff --git a/tests/Controller/AboutControllerTest.php b/tests/Controller/AboutControllerTest.php index e498d9cd..cd53809a 100644 --- a/tests/Controller/AboutControllerTest.php +++ b/tests/Controller/AboutControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class AboutControllerTest extends AbstractControllerBaseTestCase { public function testIndexAction(): void diff --git a/tests/Controller/ActivityControllerTest.php b/tests/Controller/ActivityControllerTest.php index 48a47983..aceafb40 100644 --- a/tests/Controller/ActivityControllerTest.php +++ b/tests/Controller/ActivityControllerTest.php @@ -19,13 +19,13 @@ use App\Tests\DataFixtures\TeamFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\Tests\Mocks\ActivityTestMetaFieldSubscriberMock; use Doctrine\ORM\EntityManager; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\DomCrawler\Field\ChoiceFormField; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpKernel\HttpKernelBrowser; -/** - * @group integration - */ +#[Group('integration')] class ActivityControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void @@ -427,9 +427,7 @@ class ActivityControllerTest extends AbstractControllerBaseTestCase self::assertFalse($client->getResponse()->isSuccessful()); } - /** - * @dataProvider getValidationTestData - */ + #[DataProvider('getValidationTestData')] public function testValidationForCreateAction(array $formData, array $validationFields): void { $this->assertFormHasValidationError( diff --git a/tests/Controller/Auth/SamlControllerTest.php b/tests/Controller/Auth/SamlControllerTest.php index 34c1ccb4..ed0ef7f1 100644 --- a/tests/Controller/Auth/SamlControllerTest.php +++ b/tests/Controller/Auth/SamlControllerTest.php @@ -19,15 +19,14 @@ use App\Tests\Mocks\Saml\SamlAuthFactoryFactory; use App\Tests\Mocks\SecurityFactory; use App\Tests\Mocks\SystemConfigurationFactory; use OneLogin\Saml2\Auth; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Security\Http\SecurityRequestAttributes; -/** - * @group integration - */ +#[Group('integration')] class SamlControllerTest extends TestCase { protected function getSystemConfigurationMock(array $settings, array $loaderSettings = []): SystemConfiguration diff --git a/tests/Controller/CalendarControllerTest.php b/tests/Controller/CalendarControllerTest.php index 47386af0..945db2c8 100644 --- a/tests/Controller/CalendarControllerTest.php +++ b/tests/Controller/CalendarControllerTest.php @@ -14,10 +14,9 @@ use App\Entity\User; use App\Tests\Configuration\TestConfigLoader; use App\Tests\DataFixtures\TimesheetFixtures; use App\Tests\Mocks\SystemConfigurationFactory; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class CalendarControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/ContractControllerTest.php b/tests/Controller/ContractControllerTest.php index 857edcb9..d4fa48cf 100644 --- a/tests/Controller/ContractControllerTest.php +++ b/tests/Controller/ContractControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class ContractControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/CustomerControllerTest.php b/tests/Controller/CustomerControllerTest.php index 07113d51..ef64e7a1 100644 --- a/tests/Controller/CustomerControllerTest.php +++ b/tests/Controller/CustomerControllerTest.php @@ -20,13 +20,13 @@ use App\Tests\DataFixtures\TeamFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\Tests\Mocks\CustomerTestMetaFieldSubscriberMock; use Doctrine\ORM\EntityManager; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\DomCrawler\Field\ChoiceFormField; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpKernel\HttpKernelBrowser; -/** - * @group integration - */ +#[Group('integration')] class CustomerControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void @@ -513,9 +513,7 @@ class CustomerControllerTest extends AbstractControllerBaseTestCase self::assertFalse($client->getResponse()->isSuccessful()); } - /** - * @dataProvider getValidationTestData - */ + #[DataProvider('getValidationTestData')] public function testValidationForCreateAction(array $formData, array $validationFields): void { $this->assertFormHasValidationError( diff --git a/tests/Controller/DashboardControllerTest.php b/tests/Controller/DashboardControllerTest.php index 593f8182..dd094e78 100644 --- a/tests/Controller/DashboardControllerTest.php +++ b/tests/Controller/DashboardControllerTest.php @@ -9,9 +9,9 @@ namespace App\Tests\Controller; -/** - * @group integration - */ +use PHPUnit\Framework\Attributes\Group; + +#[Group('integration')] class DashboardControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/DoctorControllerTest.php b/tests/Controller/DoctorControllerTest.php index 8f5e7d6b..2dc9f441 100644 --- a/tests/Controller/DoctorControllerTest.php +++ b/tests/Controller/DoctorControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class DoctorControllerTest extends AbstractControllerBaseTestCase { public function testDoctorIsSecure(): void diff --git a/tests/Controller/ExportControllerTest.php b/tests/Controller/ExportControllerTest.php index 8705e23d..d0c971c3 100644 --- a/tests/Controller/ExportControllerTest.php +++ b/tests/Controller/ExportControllerTest.php @@ -16,11 +16,10 @@ use App\Entity\User; use App\Tests\DataFixtures\ExportTemplateFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use Doctrine\ORM\EntityManager; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\DomCrawler\Field\FormField; -/** - * @group integration - */ +#[Group('integration')] class ExportControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/FavoriteControllerTest.php b/tests/Controller/FavoriteControllerTest.php index 3e16e68f..e6e8d309 100644 --- a/tests/Controller/FavoriteControllerTest.php +++ b/tests/Controller/FavoriteControllerTest.php @@ -11,10 +11,9 @@ namespace App\Tests\Controller; use App\Entity\User; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class FavoriteControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/HelpControllerTest.php b/tests/Controller/HelpControllerTest.php index c9238ea5..022ed1e6 100644 --- a/tests/Controller/HelpControllerTest.php +++ b/tests/Controller/HelpControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class HelpControllerTest extends AbstractControllerBaseTestCase { public function testHelpLocalesAction(): void diff --git a/tests/Controller/HomepageControllerTest.php b/tests/Controller/HomepageControllerTest.php index 778c28b3..679087b3 100644 --- a/tests/Controller/HomepageControllerTest.php +++ b/tests/Controller/HomepageControllerTest.php @@ -12,10 +12,9 @@ namespace App\Tests\Controller; use App\Entity\User; use App\Entity\UserPreference; use App\Form\Type\InitialViewType; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class HomepageControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/InvoiceControllerTest.php b/tests/Controller/InvoiceControllerTest.php index dee49aa0..40a06502 100644 --- a/tests/Controller/InvoiceControllerTest.php +++ b/tests/Controller/InvoiceControllerTest.php @@ -15,11 +15,10 @@ use App\Entity\Timesheet; use App\Entity\User; use App\Tests\DataFixtures\InvoiceTemplateFixtures; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\BinaryFileResponse; -/** - * @group integration - */ +#[Group('integration')] class InvoiceControllerTest extends AbstractControllerBaseTestCase { protected function setUp(): void diff --git a/tests/Controller/LayoutControllerTest.php b/tests/Controller/LayoutControllerTest.php index 979ea021..266d059f 100644 --- a/tests/Controller/LayoutControllerTest.php +++ b/tests/Controller/LayoutControllerTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Controller; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpKernel\HttpKernelBrowser; -/** - * @group integration - */ +#[Group('integration')] class LayoutControllerTest extends AbstractControllerBaseTestCase { public function testNavigationMenus(): void diff --git a/tests/Controller/PermissionControllerTest.php b/tests/Controller/PermissionControllerTest.php index fec28f26..605422ab 100644 --- a/tests/Controller/PermissionControllerTest.php +++ b/tests/Controller/PermissionControllerTest.php @@ -13,10 +13,9 @@ use App\DataFixtures\UserFixtures; use App\Entity\Role; use App\Entity\RolePermission; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class PermissionControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/PluginControllerTest.php b/tests/Controller/PluginControllerTest.php index 4647fa9d..34e253b3 100644 --- a/tests/Controller/PluginControllerTest.php +++ b/tests/Controller/PluginControllerTest.php @@ -12,10 +12,9 @@ namespace App\Tests\Controller; use App\Entity\User; use App\Plugin\PluginManager; use App\Tests\Plugin\Fixtures\TestPlugin\TestPlugin; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class PluginControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/ProfileControllerTest.php b/tests/Controller/ProfileControllerTest.php index 718e53b4..74a8c818 100644 --- a/tests/Controller/ProfileControllerTest.php +++ b/tests/Controller/ProfileControllerTest.php @@ -16,13 +16,13 @@ use App\Repository\AccessTokenRepository; use App\Tests\DataFixtures\TeamFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\WorkingTime\Mode\WorkingTimeModeDay; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\DomCrawler\Field\ChoiceFormField; use Symfony\Component\HttpKernel\HttpKernelBrowser; use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -/** - * @group integration - */ +#[Group('integration')] class ProfileControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void @@ -107,9 +107,7 @@ class ProfileControllerTest extends AbstractControllerBaseTestCase ]; } - /** - * @dataProvider getTabTestData - */ + #[DataProvider('getTabTestData')] public function testEditActionTabs($role, $username): void { $client = $this->getClientForAuthenticatedUser($role); @@ -285,9 +283,7 @@ class ProfileControllerTest extends AbstractControllerBaseTestCase self::assertEquals($code->innerText(), $tokens[1]->getToken()); } - /** - * @group legacy - */ + #[Group('legacy')] public function testCreateApiPassword(): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_USER); @@ -323,9 +319,7 @@ class ProfileControllerTest extends AbstractControllerBaseTestCase self::assertTrue($passwordEncoder->getPasswordHasher($user)->verify($user->getApiToken(), 'test1234')); } - /** - * @group legacy - */ + #[Group('legacy')] public function testCreateApiPasswordFailsIfPasswordLengthToShort(): void { $this->assertFormHasValidationError( @@ -444,9 +438,7 @@ class ProfileControllerTest extends AbstractControllerBaseTestCase ]; } - /** - * @dataProvider getPreferencesTestData - */ + #[DataProvider('getPreferencesTestData')] public function testPreferencesAction($role, $username, $hourlyRateOriginal, $hourlyRate, string $expectedLocale, float|null $expectedInternalRate, bool $withRateSettings): void { $client = $this->getClientForAuthenticatedUser($role); diff --git a/tests/Controller/ProjectControllerTest.php b/tests/Controller/ProjectControllerTest.php index 13b8302b..878a9a02 100644 --- a/tests/Controller/ProjectControllerTest.php +++ b/tests/Controller/ProjectControllerTest.php @@ -24,13 +24,13 @@ use App\Tests\DataFixtures\TeamFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\Tests\Mocks\ProjectTestMetaFieldSubscriberMock; use Doctrine\ORM\EntityManager; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\DomCrawler\Field\ChoiceFormField; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpKernel\HttpKernelBrowser; -/** - * @group integration - */ +#[Group('integration')] class ProjectControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void @@ -599,9 +599,7 @@ class ProjectControllerTest extends AbstractControllerBaseTestCase self::assertFalse($client->getResponse()->isSuccessful()); } - /** - * @dataProvider getValidationTestData - */ + #[DataProvider('getValidationTestData')] public function testValidationForCreateAction(array $formData, array $validationFields): void { $this->assertFormHasValidationError( diff --git a/tests/Controller/QuickEntryControllerTest.php b/tests/Controller/QuickEntryControllerTest.php index e4ebdc6b..02ba5c01 100644 --- a/tests/Controller/QuickEntryControllerTest.php +++ b/tests/Controller/QuickEntryControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class QuickEntryControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/Reporting/AbstractUserPeriodControllerTestCase.php b/tests/Controller/Reporting/AbstractUserPeriodControllerTestCase.php index 27e812f5..66a004eb 100644 --- a/tests/Controller/Reporting/AbstractUserPeriodControllerTestCase.php +++ b/tests/Controller/Reporting/AbstractUserPeriodControllerTestCase.php @@ -12,11 +12,11 @@ namespace App\Tests\Controller\Reporting; use App\Entity\User; use App\Tests\Controller\AbstractControllerBaseTestCase; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\BinaryFileResponse; -/** - * @group integration - */ +#[Group('integration')] abstract class AbstractUserPeriodControllerTestCase extends AbstractControllerBaseTestCase { protected function importReportingFixture(string $role): void @@ -49,9 +49,7 @@ abstract class AbstractUserPeriodControllerTestCase extends AbstractControllerBa ]; } - /** - * @dataProvider getTestData - */ + #[DataProvider('getTestData')] public function testUserPeriodReport(int $user, string $dataType, string $title): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN); @@ -64,9 +62,7 @@ abstract class AbstractUserPeriodControllerTestCase extends AbstractControllerBa self::assertEquals($title, $cell->text()); } - /** - * @dataProvider getTestData - */ + #[DataProvider('getTestData')] public function testUserPeriodReportExport(int $user, string $dataType, string $title): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN); diff --git a/tests/Controller/Reporting/AbstractUsersPeriodControllerTestCase.php b/tests/Controller/Reporting/AbstractUsersPeriodControllerTestCase.php index f97af729..7d15151f 100644 --- a/tests/Controller/Reporting/AbstractUsersPeriodControllerTestCase.php +++ b/tests/Controller/Reporting/AbstractUsersPeriodControllerTestCase.php @@ -12,11 +12,11 @@ namespace App\Tests\Controller\Reporting; use App\Entity\User; use App\Tests\Controller\AbstractControllerBaseTestCase; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\BinaryFileResponse; -/** - * @group integration - */ +#[Group('integration')] abstract class AbstractUsersPeriodControllerTestCase extends AbstractControllerBaseTestCase { protected function importReportingFixture(string $role): void @@ -49,9 +49,7 @@ abstract class AbstractUsersPeriodControllerTestCase extends AbstractControllerB ]; } - /** - * @dataProvider getTestData - */ + #[DataProvider('getTestData')] public function testUsersPeriodReport(string $dataType, string $title): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN); @@ -62,9 +60,7 @@ abstract class AbstractUsersPeriodControllerTestCase extends AbstractControllerB self::assertEquals($title, $cell->text()); } - /** - * @dataProvider getTestData - */ + #[DataProvider('getTestData')] public function testUsersPeriodReportAsTeamlead(string $dataType, string $title): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD); @@ -77,9 +73,7 @@ abstract class AbstractUsersPeriodControllerTestCase extends AbstractControllerB self::assertEquals($title, $cell->text()); } - /** - * @dataProvider getTestData - */ + #[DataProvider('getTestData')] public function testUsersPeriodReportExport(string $dataType, string $title): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN); diff --git a/tests/Controller/Reporting/CustomerMonthlyProjectsControllerTest.php b/tests/Controller/Reporting/CustomerMonthlyProjectsControllerTest.php index 47c7fc53..d592669d 100644 --- a/tests/Controller/Reporting/CustomerMonthlyProjectsControllerTest.php +++ b/tests/Controller/Reporting/CustomerMonthlyProjectsControllerTest.php @@ -16,12 +16,11 @@ use App\Tests\DataFixtures\ActivityFixtures; use App\Tests\DataFixtures\CustomerFixtures; use App\Tests\DataFixtures\ProjectFixtures; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpKernel\HttpKernelBrowser; -/** - * @group integration - */ +#[Group('integration')] class CustomerMonthlyProjectsControllerTest extends AbstractControllerBaseTestCase { public function testReportIsSecure(): void diff --git a/tests/Controller/Reporting/ProjectDateRangeControllerTest.php b/tests/Controller/Reporting/ProjectDateRangeControllerTest.php index 8be5e4b9..cdefbfad 100644 --- a/tests/Controller/Reporting/ProjectDateRangeControllerTest.php +++ b/tests/Controller/Reporting/ProjectDateRangeControllerTest.php @@ -17,10 +17,9 @@ use App\Tests\DataFixtures\CustomerFixtures; use App\Tests\DataFixtures\ProjectFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\Timesheet\DateTimeFactory; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class ProjectDateRangeControllerTest extends AbstractControllerBaseTestCase { public function testReportIsSecure(): void diff --git a/tests/Controller/Reporting/ProjectDetailsControllerTest.php b/tests/Controller/Reporting/ProjectDetailsControllerTest.php index a5d88cb2..e72d0abc 100644 --- a/tests/Controller/Reporting/ProjectDetailsControllerTest.php +++ b/tests/Controller/Reporting/ProjectDetailsControllerTest.php @@ -15,10 +15,9 @@ use App\Tests\DataFixtures\ActivityFixtures; use App\Tests\DataFixtures\CustomerFixtures; use App\Tests\DataFixtures\ProjectFixtures; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class ProjectDetailsControllerTest extends AbstractControllerBaseTestCase { public function testReportIsSecure(): void diff --git a/tests/Controller/Reporting/ProjectInactiveControllerTest.php b/tests/Controller/Reporting/ProjectInactiveControllerTest.php index e02635fe..3a1f8b8a 100644 --- a/tests/Controller/Reporting/ProjectInactiveControllerTest.php +++ b/tests/Controller/Reporting/ProjectInactiveControllerTest.php @@ -15,10 +15,9 @@ use App\Tests\DataFixtures\ActivityFixtures; use App\Tests\DataFixtures\CustomerFixtures; use App\Tests\DataFixtures\ProjectFixtures; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class ProjectInactiveControllerTest extends AbstractControllerBaseTestCase { public function testReportIsSecure(): void diff --git a/tests/Controller/Reporting/ProjectViewControllerTest.php b/tests/Controller/Reporting/ProjectViewControllerTest.php index c8cb1ca6..65cf2d31 100644 --- a/tests/Controller/Reporting/ProjectViewControllerTest.php +++ b/tests/Controller/Reporting/ProjectViewControllerTest.php @@ -15,11 +15,10 @@ use App\Tests\DataFixtures\ActivityFixtures; use App\Tests\DataFixtures\CustomerFixtures; use App\Tests\DataFixtures\ProjectFixtures; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\BinaryFileResponse; -/** - * @group integration - */ +#[Group('integration')] class ProjectViewControllerTest extends AbstractControllerBaseTestCase { public function testReportIsSecure(): void diff --git a/tests/Controller/Reporting/ReportUsersMonthControllerTest.php b/tests/Controller/Reporting/ReportUsersMonthControllerTest.php index 9c00b7ed..8eb64bfc 100644 --- a/tests/Controller/Reporting/ReportUsersMonthControllerTest.php +++ b/tests/Controller/Reporting/ReportUsersMonthControllerTest.php @@ -9,9 +9,9 @@ namespace App\Tests\Controller\Reporting; -/** - * @group integration - */ +use PHPUnit\Framework\Attributes\Group; + +#[Group('integration')] class ReportUsersMonthControllerTest extends AbstractUsersPeriodControllerTestCase { protected function getReportUrl(): string diff --git a/tests/Controller/Reporting/ReportUsersWeekControllerTest.php b/tests/Controller/Reporting/ReportUsersWeekControllerTest.php index 99d22964..9ea6c0b0 100644 --- a/tests/Controller/Reporting/ReportUsersWeekControllerTest.php +++ b/tests/Controller/Reporting/ReportUsersWeekControllerTest.php @@ -9,9 +9,9 @@ namespace App\Tests\Controller\Reporting; -/** - * @group integration - */ +use PHPUnit\Framework\Attributes\Group; + +#[Group('integration')] class ReportUsersWeekControllerTest extends AbstractUsersPeriodControllerTestCase { protected function getReportUrl(): string diff --git a/tests/Controller/Reporting/ReportUsersYearControllerTest.php b/tests/Controller/Reporting/ReportUsersYearControllerTest.php index 748da1ae..94204ec6 100644 --- a/tests/Controller/Reporting/ReportUsersYearControllerTest.php +++ b/tests/Controller/Reporting/ReportUsersYearControllerTest.php @@ -9,9 +9,9 @@ namespace App\Tests\Controller\Reporting; -/** - * @group integration - */ +use PHPUnit\Framework\Attributes\Group; + +#[Group('integration')] class ReportUsersYearControllerTest extends AbstractUsersPeriodControllerTestCase { protected function getReportUrl(): string diff --git a/tests/Controller/Reporting/UserMonthControllerTest.php b/tests/Controller/Reporting/UserMonthControllerTest.php index 15bcd7a9..b87564ae 100644 --- a/tests/Controller/Reporting/UserMonthControllerTest.php +++ b/tests/Controller/Reporting/UserMonthControllerTest.php @@ -9,9 +9,9 @@ namespace App\Tests\Controller\Reporting; -/** - * @group integration - */ +use PHPUnit\Framework\Attributes\Group; + +#[Group('integration')] class UserMonthControllerTest extends AbstractUserPeriodControllerTestCase { protected function getReportUrl(): string diff --git a/tests/Controller/Reporting/UserWeekControllerTest.php b/tests/Controller/Reporting/UserWeekControllerTest.php index 507ceca1..b31f9dbb 100644 --- a/tests/Controller/Reporting/UserWeekControllerTest.php +++ b/tests/Controller/Reporting/UserWeekControllerTest.php @@ -9,9 +9,9 @@ namespace App\Tests\Controller\Reporting; -/** - * @group integration - */ +use PHPUnit\Framework\Attributes\Group; + +#[Group('integration')] class UserWeekControllerTest extends AbstractUserPeriodControllerTestCase { protected function getReportUrl(): string diff --git a/tests/Controller/Reporting/UserYearControllerTest.php b/tests/Controller/Reporting/UserYearControllerTest.php index 03305adb..32c23ad9 100644 --- a/tests/Controller/Reporting/UserYearControllerTest.php +++ b/tests/Controller/Reporting/UserYearControllerTest.php @@ -9,9 +9,9 @@ namespace App\Tests\Controller\Reporting; -/** - * @group integration - */ +use PHPUnit\Framework\Attributes\Group; + +#[Group('integration')] class UserYearControllerTest extends AbstractUserPeriodControllerTestCase { protected function getReportUrl(): string diff --git a/tests/Controller/ReportingControllerTest.php b/tests/Controller/ReportingControllerTest.php index be67be78..b01ef34c 100644 --- a/tests/Controller/ReportingControllerTest.php +++ b/tests/Controller/ReportingControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class ReportingControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/Security/PasswordResetControllerTest.php b/tests/Controller/Security/PasswordResetControllerTest.php index 87ca0f40..2b84806f 100644 --- a/tests/Controller/Security/PasswordResetControllerTest.php +++ b/tests/Controller/Security/PasswordResetControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller\Security; use App\Tests\Controller\AbstractControllerBaseTestCase; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class PasswordResetControllerTest extends AbstractControllerBaseTestCase { private function testResetActionWithDeactivatedFeature(string $route, string $method = 'GET'): void diff --git a/tests/Controller/Security/SecurityControllerTest.php b/tests/Controller/Security/SecurityControllerTest.php index 6bfd005c..cdc41db9 100644 --- a/tests/Controller/Security/SecurityControllerTest.php +++ b/tests/Controller/Security/SecurityControllerTest.php @@ -16,14 +16,14 @@ use App\DataFixtures\UserFixtures; use App\Entity\User; use App\Tests\Configuration\TestConfigLoader; use App\Tests\Controller\AbstractControllerBaseTestCase; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; /** * This test makes sure the login and registration work as expected. * The logic is located in the FOSUserBundle and already tested, but we use a different layout. - * - * @group integration */ +#[Group('integration')] class SecurityControllerTest extends AbstractControllerBaseTestCase { public function testRootUrlIsRedirectedToLogin(): void diff --git a/tests/Controller/Security/SelfRegistrationControllerTest.php b/tests/Controller/Security/SelfRegistrationControllerTest.php index 2a51413b..7c703dca 100644 --- a/tests/Controller/Security/SelfRegistrationControllerTest.php +++ b/tests/Controller/Security/SelfRegistrationControllerTest.php @@ -11,11 +11,11 @@ namespace App\Tests\Controller\Security; use App\Entity\User; use App\Tests\Controller\AbstractControllerBaseTestCase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\KernelBrowser; -/** - * @group integration - */ +#[Group('integration')] class SelfRegistrationControllerTest extends AbstractControllerBaseTestCase { private function assertRegisterActionWithDeactivatedFeature(string $route): void @@ -163,9 +163,7 @@ class SelfRegistrationControllerTest extends AbstractControllerBaseTestCase self::assertTrue($client->getResponse()->isSuccessful()); } - /** - * @dataProvider getValidationTestData - */ + #[DataProvider('getValidationTestData')] public function testRegisterActionWithValidationProblems(array $formData, array $validationFields): void { $client = self::createClient(); diff --git a/tests/Controller/SystemConfigurationControllerTest.php b/tests/Controller/SystemConfigurationControllerTest.php index 007978dc..a0698d3b 100644 --- a/tests/Controller/SystemConfigurationControllerTest.php +++ b/tests/Controller/SystemConfigurationControllerTest.php @@ -11,10 +11,9 @@ namespace App\Tests\Controller; use App\Configuration\SystemConfiguration; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class SystemConfigurationControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/TagControllerTest.php b/tests/Controller/TagControllerTest.php index 15d30806..f1952029 100644 --- a/tests/Controller/TagControllerTest.php +++ b/tests/Controller/TagControllerTest.php @@ -12,10 +12,9 @@ namespace App\Tests\Controller; use App\Entity\Tag; use App\Entity\User; use App\Tests\DataFixtures\TagFixtures; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class TagControllerTest extends AbstractControllerBaseTestCase { /** diff --git a/tests/Controller/TeamControllerTest.php b/tests/Controller/TeamControllerTest.php index 8900bd9a..ee1a4122 100644 --- a/tests/Controller/TeamControllerTest.php +++ b/tests/Controller/TeamControllerTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Controller; use App\Entity\Team; use App\Entity\User; use App\Tests\DataFixtures\TeamFixtures; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpKernel\HttpKernelBrowser; -/** - * @group integration - */ +#[Group('integration')] class TeamControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/TimesheetControllerTest.php b/tests/Controller/TimesheetControllerTest.php index 377ce861..4ddf5711 100644 --- a/tests/Controller/TimesheetControllerTest.php +++ b/tests/Controller/TimesheetControllerTest.php @@ -20,11 +20,11 @@ use App\Tests\DataFixtures\TagFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\Tests\Mocks\TimesheetTestMetaFieldSubscriberMock; use App\Timesheet\DateTimeFactory; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\EventDispatcher\EventDispatcher; -/** - * @group integration - */ +#[Group('integration')] class TimesheetControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void @@ -225,9 +225,7 @@ class TimesheetControllerTest extends AbstractControllerBaseTestCase self::assertNull($timesheet->getFixedRate()); } - /** - * @dataProvider getTestDataForDurationValues - */ + #[DataProvider('getTestDataForDurationValues')] public function testCreateActionWithDurationValues($beginDate, $beginTime, $end, $duration, $expectedDuration, $expectedEnd): void { $client = $this->getClientForAuthenticatedUser(); @@ -322,9 +320,7 @@ class TimesheetControllerTest extends AbstractControllerBaseTestCase ]; } - /** - * @dataProvider getTrackingModeTestData - */ + #[DataProvider('getTrackingModeTestData')] public function testCreateActionWithTrackingModeHasFieldsForUser(string $trackingMode, string $user, bool $showBeginTime, bool $showEndTime): void { $client = $this->getClientForAuthenticatedUser($user); diff --git a/tests/Controller/TimesheetTeamControllerTest.php b/tests/Controller/TimesheetTeamControllerTest.php index f0d9490d..f7a5450e 100644 --- a/tests/Controller/TimesheetTeamControllerTest.php +++ b/tests/Controller/TimesheetTeamControllerTest.php @@ -17,10 +17,9 @@ use App\Tests\DataFixtures\TagFixtures; use App\Tests\DataFixtures\TimesheetFixtures; use App\Timesheet\DateTimeFactory; use App\Timesheet\Util; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class TimesheetTeamControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/UserControllerTest.php b/tests/Controller/UserControllerTest.php index cf3824c1..c4bec650 100644 --- a/tests/Controller/UserControllerTest.php +++ b/tests/Controller/UserControllerTest.php @@ -12,10 +12,10 @@ namespace App\Tests\Controller; use App\Entity\Timesheet; use App\Entity\User; use App\Tests\DataFixtures\TimesheetFixtures; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class UserControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void @@ -219,9 +219,7 @@ class UserControllerTest extends AbstractControllerBaseTestCase self::assertFalse($client->getResponse()->isSuccessful()); } - /** - * @dataProvider getValidationTestData - */ + #[DataProvider('getValidationTestData')] public function testValidationForCreateAction(array $formData, array $validationFields): void { $this->assertFormHasValidationError( diff --git a/tests/Controller/WidgetControllerTest.php b/tests/Controller/WidgetControllerTest.php index f5863167..94727c12 100644 --- a/tests/Controller/WidgetControllerTest.php +++ b/tests/Controller/WidgetControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class WidgetControllerTest extends AbstractControllerBaseTestCase { public function testIsSecure(): void diff --git a/tests/Controller/WizardControllerTest.php b/tests/Controller/WizardControllerTest.php index 68a1368a..34d9ad83 100644 --- a/tests/Controller/WizardControllerTest.php +++ b/tests/Controller/WizardControllerTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Controller; use App\Entity\User; +use PHPUnit\Framework\Attributes\Group; -/** - * @group integration - */ +#[Group('integration')] class WizardControllerTest extends AbstractControllerBaseTestCase { public function testUnknownWizard(): void diff --git a/tests/Customer/CustomerServiceTest.php b/tests/Customer/CustomerServiceTest.php index b3d31a8c..619ddb61 100644 --- a/tests/Customer/CustomerServiceTest.php +++ b/tests/Customer/CustomerServiceTest.php @@ -21,15 +21,15 @@ use App\Event\CustomerUpdatePreEvent; use App\Repository\CustomerRepository; use App\Tests\Mocks\SystemConfigurationFactory; use App\Validator\ValidationFailedException; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\Validator\ValidatorInterface; -/** - * @covers \App\Customer\CustomerService - */ +#[CoversClass(CustomerService::class)] class CustomerServiceTest extends TestCase { private function getSut( @@ -142,9 +142,7 @@ class CustomerServiceTest extends TestCase $sut->saveCustomer($Customer); } - /** - * @dataProvider getTestData - */ + #[DataProvider('getTestData')] public function testCustomerNumber(string $format, int|string $expected): void { $configuration = SystemConfigurationFactory::createStub([ diff --git a/tests/DependencyInjection/AppExtensionTest.php b/tests/DependencyInjection/AppExtensionTest.php index a86b9f82..84f1226b 100644 --- a/tests/DependencyInjection/AppExtensionTest.php +++ b/tests/DependencyInjection/AppExtensionTest.php @@ -11,12 +11,11 @@ namespace App\Tests\DependencyInjection; use App\DependencyInjection\AppExtension; use App\Tests\Mocks\SystemConfigurationFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; -/** - * @covers \App\DependencyInjection\AppExtension - */ +#[CoversClass(AppExtension::class)] class AppExtensionTest extends TestCase { private ?AppExtension $extension = null; diff --git a/tests/DependencyInjection/Compiler/ExportServiceCompilerPassTest.php b/tests/DependencyInjection/Compiler/ExportServiceCompilerPassTest.php index f2ed1e24..0f34d0ae 100644 --- a/tests/DependencyInjection/Compiler/ExportServiceCompilerPassTest.php +++ b/tests/DependencyInjection/Compiler/ExportServiceCompilerPassTest.php @@ -19,13 +19,12 @@ use App\Export\RendererInterface; use App\Export\ServiceExport; use App\Export\TimesheetExportInterface; use App\Export\TimesheetExportRepository; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -/** - * @covers \App\DependencyInjection\Compiler\ExportServiceCompilerPass - */ +#[CoversClass(ExportServiceCompilerPass::class)] class ExportServiceCompilerPassTest extends TestCase { private function getContainer(): ContainerBuilder diff --git a/tests/DependencyInjection/Compiler/InvoiceServiceCompilerPassTest.php b/tests/DependencyInjection/Compiler/InvoiceServiceCompilerPassTest.php index 6c5afbd4..c8db4cc0 100644 --- a/tests/DependencyInjection/Compiler/InvoiceServiceCompilerPassTest.php +++ b/tests/DependencyInjection/Compiler/InvoiceServiceCompilerPassTest.php @@ -22,13 +22,12 @@ use App\Invoice\Renderer\DocxRenderer; use App\Invoice\RendererInterface; use App\Invoice\ServiceInvoice; use App\Repository\TimesheetInvoiceItemRepository; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -/** - * @covers \App\DependencyInjection\Compiler\InvoiceServiceCompilerPass - */ +#[CoversClass(InvoiceServiceCompilerPass::class)] class InvoiceServiceCompilerPassTest extends TestCase { private function getContainer(): ContainerBuilder diff --git a/tests/DependencyInjection/Compiler/TwigContextCompilerPassTest.php b/tests/DependencyInjection/Compiler/TwigContextCompilerPassTest.php index 4a9ca45c..8840d95f 100644 --- a/tests/DependencyInjection/Compiler/TwigContextCompilerPassTest.php +++ b/tests/DependencyInjection/Compiler/TwigContextCompilerPassTest.php @@ -13,13 +13,12 @@ use App\DependencyInjection\Compiler\TwigContextCompilerPass; use App\Export\ServiceExport; use App\Twig\Configuration; use App\Twig\Context; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -/** - * @covers \App\DependencyInjection\Compiler\TwigContextCompilerPass - */ +#[CoversClass(TwigContextCompilerPass::class)] class TwigContextCompilerPassTest extends TestCase { private function getContainer(): ContainerBuilder diff --git a/tests/DependencyInjection/Compiler/WidgetCompilerPassTest.php b/tests/DependencyInjection/Compiler/WidgetCompilerPassTest.php index 8beb4b9a..78ac2239 100644 --- a/tests/DependencyInjection/Compiler/WidgetCompilerPassTest.php +++ b/tests/DependencyInjection/Compiler/WidgetCompilerPassTest.php @@ -14,13 +14,12 @@ use App\Widget\Type\ActiveTimesheets; use App\Widget\Type\ActiveUsersMonth; use App\Widget\WidgetInterface; use App\Widget\WidgetService; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -/** - * @covers \App\DependencyInjection\Compiler\WidgetCompilerPass - */ +#[CoversClass(WidgetCompilerPass::class)] class WidgetCompilerPassTest extends TestCase { private function getContainer(): ContainerBuilder diff --git a/tests/DependencyInjection/ConfigurationTest.php b/tests/DependencyInjection/ConfigurationTest.php index cac6fd62..f5fd6835 100644 --- a/tests/DependencyInjection/ConfigurationTest.php +++ b/tests/DependencyInjection/ConfigurationTest.php @@ -10,12 +10,11 @@ namespace App\Tests\DependencyInjection; use App\DependencyInjection\Configuration; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -/** - * @covers \App\DependencyInjection\Configuration - */ +#[CoversClass(Configuration::class)] class ConfigurationTest extends TestCase { protected function getMinConfig($dataDir = '/tmp/') diff --git a/tests/Doctrine/TimesheetSubscriberTest.php b/tests/Doctrine/TimesheetSubscriberTest.php index 3d435780..ec2bf4ff 100644 --- a/tests/Doctrine/TimesheetSubscriberTest.php +++ b/tests/Doctrine/TimesheetSubscriberTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Doctrine; use App\Doctrine\TimesheetSubscriber; use Doctrine\ORM\Events; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Doctrine\TimesheetSubscriber - */ +#[CoversClass(TimesheetSubscriber::class)] class TimesheetSubscriberTest extends TestCase { public function testGetSubscribedEvents(): void diff --git a/tests/Doctrine/UTCDateTimeImmutableTypeTest.php b/tests/Doctrine/UTCDateTimeImmutableTypeTest.php index f918d02d..1082d700 100644 --- a/tests/Doctrine/UTCDateTimeImmutableTypeTest.php +++ b/tests/Doctrine/UTCDateTimeImmutableTypeTest.php @@ -15,11 +15,11 @@ use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Types\ConversionException; use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Types; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Doctrine\UTCDateTimeImmutableType - */ +#[CoversClass(UTCDateTimeImmutableType::class)] class UTCDateTimeImmutableTypeTest extends TestCase { public function testGetUtc(): void @@ -33,9 +33,7 @@ class UTCDateTimeImmutableTypeTest extends TestCase self::assertEquals('UTC', $type::getUtc()->getName()); } - /** - * @dataProvider getPlatforms - */ + #[DataProvider('getPlatforms')] public function testConvertToDatabaseValue(AbstractPlatform $platform): void { Type::overrideType(Types::DATETIME_MUTABLE, UTCDateTimeImmutableType::class); @@ -61,9 +59,7 @@ class UTCDateTimeImmutableTypeTest extends TestCase self::assertEquals($bla, $result); } - /** - * @dataProvider getPlatforms - */ + #[DataProvider('getPlatforms')] public function testConvertToPHPValue(AbstractPlatform $platform): void { Type::overrideType(Types::DATETIME_MUTABLE, UTCDateTimeImmutableType::class); @@ -81,9 +77,7 @@ class UTCDateTimeImmutableTypeTest extends TestCase self::assertEquals('2019-01-17 13:30:00', $result); } - /** - * @dataProvider getPlatforms - */ + #[DataProvider('getPlatforms')] public function testConvertToPHPValueWithInvalidValue(AbstractPlatform $platform): void { $this->expectException(ConversionException::class); @@ -96,7 +90,7 @@ class UTCDateTimeImmutableTypeTest extends TestCase } /** - * @return \Doctrine\DBAL\Platforms\MySQLPlatform[][] + * @return MySQLPlatform[][] */ public static function getPlatforms(): array { diff --git a/tests/Doctrine/UTCDateTimeTypeTest.php b/tests/Doctrine/UTCDateTimeTypeTest.php index 519c84ea..418007d7 100644 --- a/tests/Doctrine/UTCDateTimeTypeTest.php +++ b/tests/Doctrine/UTCDateTimeTypeTest.php @@ -15,11 +15,11 @@ use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Types\ConversionException; use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Types; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Doctrine\UTCDateTimeType - */ +#[CoversClass(UTCDateTimeType::class)] class UTCDateTimeTypeTest extends TestCase { public function testGetUtc(): void @@ -33,9 +33,7 @@ class UTCDateTimeTypeTest extends TestCase self::assertEquals('UTC', $type::getUtc()->getName()); } - /** - * @dataProvider getPlatforms - */ + #[DataProvider('getPlatforms')] public function testConvertToDatabaseValue(AbstractPlatform $platform): void { Type::overrideType(Types::DATETIME_MUTABLE, UTCDateTimeType::class); @@ -61,9 +59,7 @@ class UTCDateTimeTypeTest extends TestCase self::assertEquals($bla, $result); } - /** - * @dataProvider getPlatforms - */ + #[DataProvider('getPlatforms')] public function testConvertToPHPValue(AbstractPlatform $platform): void { Type::overrideType(Types::DATETIME_MUTABLE, UTCDateTimeType::class); @@ -81,9 +77,7 @@ class UTCDateTimeTypeTest extends TestCase self::assertEquals('2019-01-17 13:30:00', $result); } - /** - * @dataProvider getPlatforms - */ + #[DataProvider('getPlatforms')] public function testConvertToPHPValueWithInvalidValue(AbstractPlatform $platform): void { $this->expectException(ConversionException::class); @@ -96,7 +90,7 @@ class UTCDateTimeTypeTest extends TestCase } /** - * @return \Doctrine\DBAL\Platforms\MySQLPlatform[][] + * @return MySQLPlatform[][] */ public static function getPlatforms(): array { diff --git a/tests/Entity/AccessTokenTest.php b/tests/Entity/AccessTokenTest.php index 9f56c7e5..7a90470c 100644 --- a/tests/Entity/AccessTokenTest.php +++ b/tests/Entity/AccessTokenTest.php @@ -11,10 +11,9 @@ namespace App\Tests\Entity; use App\Entity\AccessToken; use App\Entity\User; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\AccessToken - */ +#[CoversClass(AccessToken::class)] class AccessTokenTest extends AbstractEntityTestCase { public function testDefaultValues(): void diff --git a/tests/Entity/ActivityMetaTest.php b/tests/Entity/ActivityMetaTest.php index 9d8134ae..0d5373fc 100644 --- a/tests/Entity/ActivityMetaTest.php +++ b/tests/Entity/ActivityMetaTest.php @@ -14,10 +14,9 @@ use App\Entity\ActivityMeta; use App\Entity\EntityWithMetaFields; use App\Entity\MetaTableTypeInterface; use App\Entity\Timesheet; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\ActivityMeta - */ +#[CoversClass(ActivityMeta::class)] class ActivityMetaTest extends AbstractMetaEntityTestCase { protected function getEntity(): EntityWithMetaFields diff --git a/tests/Entity/ActivityRateTest.php b/tests/Entity/ActivityRateTest.php index a74baafd..26a09a3a 100644 --- a/tests/Entity/ActivityRateTest.php +++ b/tests/Entity/ActivityRateTest.php @@ -12,12 +12,13 @@ namespace App\Tests\Entity; use App\Entity\Activity; use App\Entity\ActivityRate; use App\Entity\User; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; /** - * @covers \App\Entity\ActivityRate * @covers \App\Entity\Rate */ +#[CoversClass(ActivityRate::class)] class ActivityRateTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/ActivityTest.php b/tests/Entity/ActivityTest.php index e491540a..74744a26 100644 --- a/tests/Entity/ActivityTest.php +++ b/tests/Entity/ActivityTest.php @@ -17,10 +17,9 @@ use App\Entity\Team; use App\Export\Spreadsheet\ColumnDefinition; use App\Export\Spreadsheet\Extractor\AnnotationExtractor; use Doctrine\Common\Collections\Collection; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\Activity - */ +#[CoversClass(Activity::class)] class ActivityTest extends AbstractEntityTestCase { public function testDefaultValues(): void diff --git a/tests/Entity/BookmarkTest.php b/tests/Entity/BookmarkTest.php index 22ca273d..a29d4563 100644 --- a/tests/Entity/BookmarkTest.php +++ b/tests/Entity/BookmarkTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Entity; use App\Entity\Bookmark; use App\Entity\User; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\Bookmark - */ +#[CoversClass(Bookmark::class)] class BookmarkTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/ConfigurationTest.php b/tests/Entity/ConfigurationTest.php index 265a4eb7..1f1da24d 100644 --- a/tests/Entity/ConfigurationTest.php +++ b/tests/Entity/ConfigurationTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Entity; use App\Entity\Configuration; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\Configuration - */ +#[CoversClass(Configuration::class)] class ConfigurationTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/CustomerCommentTest.php b/tests/Entity/CustomerCommentTest.php index fd56a574..057503f9 100644 --- a/tests/Entity/CustomerCommentTest.php +++ b/tests/Entity/CustomerCommentTest.php @@ -11,11 +11,12 @@ namespace App\Tests\Entity; use App\Entity\Customer; use App\Entity\CustomerComment; +use PHPUnit\Framework\Attributes\CoversClass; /** - * @covers \App\Entity\CustomerComment * @covers \App\Entity\CommentTableTypeTrait */ +#[CoversClass(CustomerComment::class)] class CustomerCommentTest extends AbstractCommentEntityTestCase { protected function getEntity(): CustomerComment diff --git a/tests/Entity/CustomerMetaTest.php b/tests/Entity/CustomerMetaTest.php index 51d61916..0206c583 100644 --- a/tests/Entity/CustomerMetaTest.php +++ b/tests/Entity/CustomerMetaTest.php @@ -14,10 +14,9 @@ use App\Entity\Customer; use App\Entity\CustomerMeta; use App\Entity\EntityWithMetaFields; use App\Entity\MetaTableTypeInterface; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\CustomerMeta - */ +#[CoversClass(CustomerMeta::class)] class CustomerMetaTest extends AbstractMetaEntityTestCase { protected function getEntity(): EntityWithMetaFields diff --git a/tests/Entity/CustomerRateTest.php b/tests/Entity/CustomerRateTest.php index 3642ff58..140cb95d 100644 --- a/tests/Entity/CustomerRateTest.php +++ b/tests/Entity/CustomerRateTest.php @@ -12,12 +12,13 @@ namespace App\Tests\Entity; use App\Entity\Customer; use App\Entity\CustomerRate; use App\Entity\User; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; /** - * @covers \App\Entity\CustomerRate * @covers \App\Entity\Rate */ +#[CoversClass(CustomerRate::class)] class CustomerRateTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/CustomerTest.php b/tests/Entity/CustomerTest.php index 0764bcfc..b1072907 100644 --- a/tests/Entity/CustomerTest.php +++ b/tests/Entity/CustomerTest.php @@ -16,10 +16,9 @@ use App\Entity\Team; use App\Export\Spreadsheet\ColumnDefinition; use App\Export\Spreadsheet\Extractor\AnnotationExtractor; use Doctrine\Common\Collections\Collection; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\Customer - */ +#[CoversClass(Customer::class)] class CustomerTest extends AbstractEntityTestCase { public function testDefaultValues(): void diff --git a/tests/Entity/ExportTemplateTest.php b/tests/Entity/ExportTemplateTest.php index 226cd698..0a7b8602 100644 --- a/tests/Entity/ExportTemplateTest.php +++ b/tests/Entity/ExportTemplateTest.php @@ -10,10 +10,9 @@ namespace App\Tests\Entity; use App\Entity\ExportTemplate; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\ExportTemplate - */ +#[CoversClass(ExportTemplate::class)] class ExportTemplateTest extends AbstractEntityTestCase { public function testDefaultValues(): void diff --git a/tests/Entity/InvoiceDocumentTest.php b/tests/Entity/InvoiceDocumentTest.php index 226c8631..7665b3d2 100644 --- a/tests/Entity/InvoiceDocumentTest.php +++ b/tests/Entity/InvoiceDocumentTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Entity; use App\Model\InvoiceDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Model\InvoiceDocument - */ +#[CoversClass(InvoiceDocument::class)] class InvoiceDocumentTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/InvoiceMetaTest.php b/tests/Entity/InvoiceMetaTest.php index ef5aaabd..b54fed1d 100644 --- a/tests/Entity/InvoiceMetaTest.php +++ b/tests/Entity/InvoiceMetaTest.php @@ -14,10 +14,9 @@ use App\Entity\EntityWithMetaFields; use App\Entity\Invoice; use App\Entity\InvoiceMeta; use App\Entity\MetaTableTypeInterface; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\InvoiceMeta - */ +#[CoversClass(InvoiceMeta::class)] class InvoiceMetaTest extends AbstractMetaEntityTestCase { protected function getEntity(): EntityWithMetaFields diff --git a/tests/Entity/InvoiceTemplateTest.php b/tests/Entity/InvoiceTemplateTest.php index f57adeaa..79651d40 100644 --- a/tests/Entity/InvoiceTemplateTest.php +++ b/tests/Entity/InvoiceTemplateTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Entity; use App\Entity\InvoiceTemplate; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\InvoiceTemplate - */ +#[CoversClass(InvoiceTemplate::class)] class InvoiceTemplateTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/InvoiceTest.php b/tests/Entity/InvoiceTest.php index 6fbaf692..30c1c165 100644 --- a/tests/Entity/InvoiceTest.php +++ b/tests/Entity/InvoiceTest.php @@ -28,11 +28,10 @@ use App\Repository\InvoiceRepository; use App\Repository\Query\InvoiceQuery; use App\Tests\Invoice\DebugFormatter; use App\Tests\Mocks\InvoiceModelFactoryFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\Invoice - */ +#[CoversClass(Invoice::class)] class InvoiceTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/ProjectCommentTest.php b/tests/Entity/ProjectCommentTest.php index 18565db4..7c9207ad 100644 --- a/tests/Entity/ProjectCommentTest.php +++ b/tests/Entity/ProjectCommentTest.php @@ -11,11 +11,12 @@ namespace App\Tests\Entity; use App\Entity\Project; use App\Entity\ProjectComment; +use PHPUnit\Framework\Attributes\CoversClass; /** - * @covers \App\Entity\ProjectComment * @covers \App\Entity\CommentTableTypeTrait */ +#[CoversClass(ProjectComment::class)] class ProjectCommentTest extends AbstractCommentEntityTestCase { protected function getEntity(): ProjectComment diff --git a/tests/Entity/ProjectMetaTest.php b/tests/Entity/ProjectMetaTest.php index 27ee8709..09ba7db5 100644 --- a/tests/Entity/ProjectMetaTest.php +++ b/tests/Entity/ProjectMetaTest.php @@ -14,10 +14,9 @@ use App\Entity\EntityWithMetaFields; use App\Entity\MetaTableTypeInterface; use App\Entity\Project; use App\Entity\ProjectMeta; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\ProjectMeta - */ +#[CoversClass(ProjectMeta::class)] class ProjectMetaTest extends AbstractMetaEntityTestCase { protected function getEntity(): EntityWithMetaFields diff --git a/tests/Entity/ProjectRateTest.php b/tests/Entity/ProjectRateTest.php index 6eb95424..ec554bc4 100644 --- a/tests/Entity/ProjectRateTest.php +++ b/tests/Entity/ProjectRateTest.php @@ -12,12 +12,13 @@ namespace App\Tests\Entity; use App\Entity\Project; use App\Entity\ProjectRate; use App\Entity\User; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; /** - * @covers \App\Entity\ProjectRate * @covers \App\Entity\Rate */ +#[CoversClass(ProjectRate::class)] class ProjectRateTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/ProjectTest.php b/tests/Entity/ProjectTest.php index 47b9350e..45e4737d 100644 --- a/tests/Entity/ProjectTest.php +++ b/tests/Entity/ProjectTest.php @@ -17,10 +17,9 @@ use App\Entity\Team; use App\Export\Spreadsheet\ColumnDefinition; use App\Export\Spreadsheet\Extractor\AnnotationExtractor; use Doctrine\Common\Collections\Collection; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\Project - */ +#[CoversClass(Project::class)] class ProjectTest extends AbstractEntityTestCase { public function testDefaultValues(): void diff --git a/tests/Entity/RolePermissionTest.php b/tests/Entity/RolePermissionTest.php index ff8466ab..6bcab21b 100644 --- a/tests/Entity/RolePermissionTest.php +++ b/tests/Entity/RolePermissionTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Entity; use App\Entity\Role; use App\Entity\RolePermission; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\RolePermission - */ +#[CoversClass(RolePermission::class)] class RolePermissionTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/RoleTest.php b/tests/Entity/RoleTest.php index 66b9f014..ede48221 100644 --- a/tests/Entity/RoleTest.php +++ b/tests/Entity/RoleTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Entity; use App\Entity\Role; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\Role - */ +#[CoversClass(Role::class)] class RoleTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/TagTest.php b/tests/Entity/TagTest.php index 96a93407..f02455de 100644 --- a/tests/Entity/TagTest.php +++ b/tests/Entity/TagTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Entity; use App\Entity\Tag; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\Tag - */ +#[CoversClass(Tag::class)] class TagTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/TeamTest.php b/tests/Entity/TeamTest.php index c764b227..da8d4447 100644 --- a/tests/Entity/TeamTest.php +++ b/tests/Entity/TeamTest.php @@ -17,11 +17,10 @@ use App\Entity\Team; use App\Entity\TeamMember; use App\Entity\User; use Doctrine\Common\Collections\Collection; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\Team - */ +#[CoversClass(Team::class)] class TeamTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/TimesheetMetaTest.php b/tests/Entity/TimesheetMetaTest.php index f3c25c4a..d8b1b56c 100644 --- a/tests/Entity/TimesheetMetaTest.php +++ b/tests/Entity/TimesheetMetaTest.php @@ -14,10 +14,9 @@ use App\Entity\MetaTableTypeInterface; use App\Entity\Project; use App\Entity\Timesheet; use App\Entity\TimesheetMeta; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Entity\TimesheetMeta - */ +#[CoversClass(TimesheetMeta::class)] class TimesheetMetaTest extends AbstractMetaEntityTestCase { protected function getEntity(): EntityWithMetaFields diff --git a/tests/Entity/TimesheetTest.php b/tests/Entity/TimesheetTest.php index 0f07a3d3..480fd22e 100644 --- a/tests/Entity/TimesheetTest.php +++ b/tests/Entity/TimesheetTest.php @@ -18,11 +18,10 @@ use App\Entity\TimesheetMeta; use App\Entity\User; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\Timesheet - */ +#[CoversClass(Timesheet::class)] class TimesheetTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/TimesheetValidationTest.php b/tests/Entity/TimesheetValidationTest.php index 12402162..a97b620c 100644 --- a/tests/Entity/TimesheetValidationTest.php +++ b/tests/Entity/TimesheetValidationTest.php @@ -14,12 +14,12 @@ use App\Entity\Customer; use App\Entity\Project; use App\Entity\Timesheet; use App\Entity\User; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; -/** - * @covers \App\Entity\Timesheet - * @group integration - */ +#[CoversClass(Timesheet::class)] +#[Group('integration')] class TimesheetValidationTest extends KernelTestCase { use EntityValidationTestTrait; diff --git a/tests/Entity/UserPreferenceTest.php b/tests/Entity/UserPreferenceTest.php index 06c61702..b9531fa2 100644 --- a/tests/Entity/UserPreferenceTest.php +++ b/tests/Entity/UserPreferenceTest.php @@ -11,12 +11,11 @@ namespace App\Tests\Entity; use App\Entity\UserPreference; use App\Form\Type\YesNoType; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\Form\Extension\Core\Type\IntegerType; -/** - * @covers \App\Entity\UserPreference - */ +#[CoversClass(UserPreference::class)] class UserPreferenceTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Entity/UserTest.php b/tests/Entity/UserTest.php index 51d0d907..c79699d6 100644 --- a/tests/Entity/UserTest.php +++ b/tests/Entity/UserTest.php @@ -19,13 +19,13 @@ use App\Export\Spreadsheet\Extractor\AnnotationExtractor; use App\Tests\Security\TestUserEntity; use App\WorkingTime\Mode\WorkingTimeModeDay; use Doctrine\Common\Collections\ArrayCollection; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\Security\Core\User\EquatableInterface; use Symfony\Component\Security\Core\User\UserInterface; -/** - * @covers \App\Entity\User - */ +#[CoversClass(User::class)] class UserTest extends TestCase { public function testDefaultValues(): void @@ -88,8 +88,8 @@ class UserTest extends TestCase /** * @deprecated - * @group legacy */ + #[Group('legacy')] public function testWorkContract(): void { $user = new User(); diff --git a/tests/Entity/UserValidationTest.php b/tests/Entity/UserValidationTest.php index e3ff81aa..bd247ab6 100644 --- a/tests/Entity/UserValidationTest.php +++ b/tests/Entity/UserValidationTest.php @@ -10,12 +10,13 @@ namespace App\Tests\Entity; use App\Entity\User; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; -/** - * @covers \App\Entity\User - * @group integration - */ +#[CoversClass(User::class)] +#[Group('integration')] class UserValidationTest extends KernelTestCase { use EntityValidationTestTrait; @@ -29,9 +30,7 @@ class UserValidationTest extends KernelTestCase ]; } - /** - * @dataProvider getInvalidTestData - */ + #[DataProvider('getInvalidTestData')] public function testInvalidValues($username, $email, $roles = []): void { $defaultFields = [ @@ -77,9 +76,7 @@ class UserValidationTest extends KernelTestCase ]; } - /** - * @dataProvider getValidTestData - */ + #[DataProvider('getValidTestData')] public function testValidValues($username, $email, $roles = []): void { $user = new User(); diff --git a/tests/Entity/WorkingTimeTest.php b/tests/Entity/WorkingTimeTest.php index 7e9de940..50963506 100644 --- a/tests/Entity/WorkingTimeTest.php +++ b/tests/Entity/WorkingTimeTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Entity; use App\Entity\User; use App\Entity\WorkingTime; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Entity\WorkingTime - */ +#[CoversClass(WorkingTime::class)] class WorkingTimeTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/ActivityBudgetStatisticEventTest.php b/tests/Event/ActivityBudgetStatisticEventTest.php index 1b1c1f3c..78e13fdd 100644 --- a/tests/Event/ActivityBudgetStatisticEventTest.php +++ b/tests/Event/ActivityBudgetStatisticEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Activity; use App\Event\ActivityBudgetStatisticEvent; use App\Model\ActivityBudgetStatisticModel; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\ActivityBudgetStatisticEvent - */ +#[CoversClass(ActivityBudgetStatisticEvent::class)] class ActivityBudgetStatisticEventTest extends TestCase { public function testStatistic(): void diff --git a/tests/Event/ActivityCreateEventTest.php b/tests/Event/ActivityCreateEventTest.php index 555a4e56..01b14853 100644 --- a/tests/Event/ActivityCreateEventTest.php +++ b/tests/Event/ActivityCreateEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Activity; use App\Event\AbstractActivityEvent; use App\Event\ActivityCreateEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractActivityEvent - * @covers \App\Event\ActivityCreateEvent - */ +#[CoversClass(AbstractActivityEvent::class)] +#[CoversClass(ActivityCreateEvent::class)] class ActivityCreateEventTest extends AbstractActivityEventTestCase { protected function createActivityEvent(Activity $activity): AbstractActivityEvent diff --git a/tests/Event/ActivityCreatePostEventTest.php b/tests/Event/ActivityCreatePostEventTest.php index 63a751f0..66995a56 100644 --- a/tests/Event/ActivityCreatePostEventTest.php +++ b/tests/Event/ActivityCreatePostEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Activity; use App\Event\AbstractActivityEvent; use App\Event\ActivityCreatePostEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractActivityEvent - * @covers \App\Event\ActivityCreatePostEvent - */ +#[CoversClass(AbstractActivityEvent::class)] +#[CoversClass(ActivityCreatePostEvent::class)] class ActivityCreatePostEventTest extends AbstractActivityEventTestCase { protected function createActivityEvent(Activity $activity): AbstractActivityEvent diff --git a/tests/Event/ActivityCreatePreEventTest.php b/tests/Event/ActivityCreatePreEventTest.php index 4271ef1c..c366b8e1 100644 --- a/tests/Event/ActivityCreatePreEventTest.php +++ b/tests/Event/ActivityCreatePreEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Activity; use App\Event\AbstractActivityEvent; use App\Event\ActivityCreatePreEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractActivityEvent - * @covers \App\Event\ActivityCreatePreEvent - */ +#[CoversClass(AbstractActivityEvent::class)] +#[CoversClass(ActivityCreatePreEvent::class)] class ActivityCreatePreEventTest extends AbstractActivityEventTestCase { protected function createActivityEvent(Activity $activity): AbstractActivityEvent diff --git a/tests/Event/ActivityDetailControllerEventTest.php b/tests/Event/ActivityDetailControllerEventTest.php index 96b61096..495e1385 100644 --- a/tests/Event/ActivityDetailControllerEventTest.php +++ b/tests/Event/ActivityDetailControllerEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Activity; use App\Event\AbstractActivityEvent; use App\Event\ActivityDetailControllerEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractActivityEvent - * @covers \App\Event\ActivityDetailControllerEvent - */ +#[CoversClass(AbstractActivityEvent::class)] +#[CoversClass(ActivityDetailControllerEvent::class)] class ActivityDetailControllerEventTest extends AbstractActivityEventTestCase { protected function createActivityEvent(Activity $activity): AbstractActivityEvent diff --git a/tests/Event/ActivityMetaDefinitionEventTest.php b/tests/Event/ActivityMetaDefinitionEventTest.php index 204d7370..98b204d7 100644 --- a/tests/Event/ActivityMetaDefinitionEventTest.php +++ b/tests/Event/ActivityMetaDefinitionEventTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Event; use App\Entity\Activity; use App\Event\ActivityMetaDefinitionEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\ActivityMetaDefinitionEvent - */ +#[CoversClass(ActivityMetaDefinitionEvent::class)] class ActivityMetaDefinitionEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/ActivityMetaDisplayEventTest.php b/tests/Event/ActivityMetaDisplayEventTest.php index a572fb0e..60ac71b3 100644 --- a/tests/Event/ActivityMetaDisplayEventTest.php +++ b/tests/Event/ActivityMetaDisplayEventTest.php @@ -10,15 +10,15 @@ namespace App\Tests\Event; use App\Entity\ActivityMeta; +use App\Event\AbstractMetaDisplayEvent; use App\Event\ActivityMetaDisplayEvent; use App\Event\MetaDisplayEventInterface; use App\Repository\Query\ActivityQuery; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\AbstractMetaDisplayEvent - * @covers \App\Event\ActivityMetaDisplayEvent - */ +#[CoversClass(AbstractMetaDisplayEvent::class)] +#[CoversClass(ActivityMetaDisplayEvent::class)] class ActivityMetaDisplayEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/ActivityStatisticEventTest.php b/tests/Event/ActivityStatisticEventTest.php index c4cafc79..1a15ccc8 100644 --- a/tests/Event/ActivityStatisticEventTest.php +++ b/tests/Event/ActivityStatisticEventTest.php @@ -13,11 +13,10 @@ use App\Entity\Activity; use App\Event\AbstractActivityEvent; use App\Event\ActivityStatisticEvent; use App\Model\ActivityStatistic; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractActivityEvent - * @covers \App\Event\ActivityStatisticEvent - */ +#[CoversClass(AbstractActivityEvent::class)] +#[CoversClass(ActivityStatisticEvent::class)] class ActivityStatisticEventTest extends AbstractActivityEventTestCase { protected function createActivityEvent(Activity $activity): AbstractActivityEvent diff --git a/tests/Event/ActivityUpdatePostEventTest.php b/tests/Event/ActivityUpdatePostEventTest.php index 59cab996..01c07355 100644 --- a/tests/Event/ActivityUpdatePostEventTest.php +++ b/tests/Event/ActivityUpdatePostEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Activity; use App\Event\AbstractActivityEvent; use App\Event\ActivityUpdatePostEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractActivityEvent - * @covers \App\Event\ActivityUpdatePostEvent - */ +#[CoversClass(AbstractActivityEvent::class)] +#[CoversClass(ActivityUpdatePostEvent::class)] class ActivityUpdatePostEventTest extends AbstractActivityEventTestCase { protected function createActivityEvent(Activity $activity): AbstractActivityEvent diff --git a/tests/Event/ActivityUpdatePreEventTest.php b/tests/Event/ActivityUpdatePreEventTest.php index 439c8312..7b51f7a2 100644 --- a/tests/Event/ActivityUpdatePreEventTest.php +++ b/tests/Event/ActivityUpdatePreEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Activity; use App\Event\AbstractActivityEvent; use App\Event\ActivityUpdatePreEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractActivityEvent - * @covers \App\Event\ActivityUpdatePreEvent - */ +#[CoversClass(AbstractActivityEvent::class)] +#[CoversClass(ActivityUpdatePreEvent::class)] class ActivityUpdatePreEventTest extends AbstractActivityEventTestCase { protected function createActivityEvent(Activity $activity): AbstractActivityEvent diff --git a/tests/Event/CalendarConfigurationEventTest.php b/tests/Event/CalendarConfigurationEventTest.php index cf13b910..e827df3c 100644 --- a/tests/Event/CalendarConfigurationEventTest.php +++ b/tests/Event/CalendarConfigurationEventTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Event; use App\Event\CalendarConfigurationEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\CalendarConfigurationEvent - */ +#[CoversClass(CalendarConfigurationEvent::class)] class CalendarConfigurationEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/CalendarDragAndDropSourceEventTest.php b/tests/Event/CalendarDragAndDropSourceEventTest.php index 7a40e2b7..879b97e9 100644 --- a/tests/Event/CalendarDragAndDropSourceEventTest.php +++ b/tests/Event/CalendarDragAndDropSourceEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Calendar\DragAndDropSource; use App\Entity\User; use App\Event\CalendarDragAndDropSourceEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\CalendarDragAndDropSourceEvent - */ +#[CoversClass(CalendarDragAndDropSourceEvent::class)] class CalendarDragAndDropSourceEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/CalendarGoogleSourceEventTest.php b/tests/Event/CalendarGoogleSourceEventTest.php index 52e60200..e68f0c9c 100644 --- a/tests/Event/CalendarGoogleSourceEventTest.php +++ b/tests/Event/CalendarGoogleSourceEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Calendar\GoogleSource; use App\Entity\User; use App\Event\CalendarGoogleSourceEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\CalendarGoogleSourceEvent - */ +#[CoversClass(CalendarGoogleSourceEvent::class)] class CalendarGoogleSourceEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/CalendarSourceEventTest.php b/tests/Event/CalendarSourceEventTest.php index 29f71052..b99d05e9 100644 --- a/tests/Event/CalendarSourceEventTest.php +++ b/tests/Event/CalendarSourceEventTest.php @@ -13,11 +13,10 @@ use App\Calendar\CalendarSource; use App\Calendar\CalendarSourceType; use App\Entity\User; use App\Event\CalendarSourceEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\CalendarSourceEvent - */ +#[CoversClass(CalendarSourceEvent::class)] class CalendarSourceEventTest extends TestCase { public function testEvent(): void diff --git a/tests/Event/ConfigureMainMenuEventTest.php b/tests/Event/ConfigureMainMenuEventTest.php index cc2e6a97..d13600a3 100644 --- a/tests/Event/ConfigureMainMenuEventTest.php +++ b/tests/Event/ConfigureMainMenuEventTest.php @@ -11,17 +11,17 @@ namespace App\Tests\Event; use App\Event\ConfigureMainMenuEvent; use App\Utils\MenuItemModel; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\ConfigureMainMenuEvent - */ +#[CoversClass(ConfigureMainMenuEvent::class)] class ConfigureMainMenuEventTest extends TestCase { /** * @deprecated - * @group legacy */ + #[Group('legacy')] public function testLegacy(): void { $sut = new ConfigureMainMenuEvent(); diff --git a/tests/Event/CustomerCreateEventTest.php b/tests/Event/CustomerCreateEventTest.php index a5ea5e8d..47d9d8cf 100644 --- a/tests/Event/CustomerCreateEventTest.php +++ b/tests/Event/CustomerCreateEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Customer; use App\Event\AbstractCustomerEvent; use App\Event\CustomerCreateEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractCustomerEvent - * @covers \App\Event\CustomerCreateEvent - */ +#[CoversClass(AbstractCustomerEvent::class)] +#[CoversClass(CustomerCreateEvent::class)] class CustomerCreateEventTest extends AbstractCustomerEventTestCase { protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent diff --git a/tests/Event/CustomerCreatePostEventTest.php b/tests/Event/CustomerCreatePostEventTest.php index 7b4c0159..3d4afc2e 100644 --- a/tests/Event/CustomerCreatePostEventTest.php +++ b/tests/Event/CustomerCreatePostEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Customer; use App\Event\AbstractCustomerEvent; use App\Event\CustomerCreatePostEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractCustomerEvent - * @covers \App\Event\CustomerCreatePostEvent - */ +#[CoversClass(AbstractCustomerEvent::class)] +#[CoversClass(CustomerCreatePostEvent::class)] class CustomerCreatePostEventTest extends AbstractCustomerEventTestCase { protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent diff --git a/tests/Event/CustomerCreatePreEventTest.php b/tests/Event/CustomerCreatePreEventTest.php index 99e60af8..a6a0ff74 100644 --- a/tests/Event/CustomerCreatePreEventTest.php +++ b/tests/Event/CustomerCreatePreEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Customer; use App\Event\AbstractCustomerEvent; use App\Event\CustomerCreatePreEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractCustomerEvent - * @covers \App\Event\CustomerCreatePreEvent - */ +#[CoversClass(AbstractCustomerEvent::class)] +#[CoversClass(CustomerCreatePreEvent::class)] class CustomerCreatePreEventTest extends AbstractCustomerEventTestCase { protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent diff --git a/tests/Event/CustomerDetailControllerEventTest.php b/tests/Event/CustomerDetailControllerEventTest.php index a53f4f65..77f02192 100644 --- a/tests/Event/CustomerDetailControllerEventTest.php +++ b/tests/Event/CustomerDetailControllerEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Customer; use App\Event\AbstractCustomerEvent; use App\Event\CustomerDetailControllerEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractCustomerEvent - * @covers \App\Event\CustomerDetailControllerEvent - */ +#[CoversClass(AbstractCustomerEvent::class)] +#[CoversClass(CustomerDetailControllerEvent::class)] class CustomerDetailControllerEventTest extends AbstractCustomerEventTestCase { protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent diff --git a/tests/Event/CustomerMetaDefinitionEventTest.php b/tests/Event/CustomerMetaDefinitionEventTest.php index 3df261c1..b53689ba 100644 --- a/tests/Event/CustomerMetaDefinitionEventTest.php +++ b/tests/Event/CustomerMetaDefinitionEventTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Event; use App\Entity\Customer; use App\Event\CustomerMetaDefinitionEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\CustomerMetaDefinitionEvent - */ +#[CoversClass(CustomerMetaDefinitionEvent::class)] class CustomerMetaDefinitionEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/CustomerMetaDisplayEventTest.php b/tests/Event/CustomerMetaDisplayEventTest.php index a34e577e..60d986d2 100644 --- a/tests/Event/CustomerMetaDisplayEventTest.php +++ b/tests/Event/CustomerMetaDisplayEventTest.php @@ -10,15 +10,15 @@ namespace App\Tests\Event; use App\Entity\CustomerMeta; +use App\Event\AbstractMetaDisplayEvent; use App\Event\CustomerMetaDisplayEvent; use App\Event\MetaDisplayEventInterface; use App\Repository\Query\CustomerQuery; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\AbstractMetaDisplayEvent - * @covers \App\Event\CustomerMetaDisplayEvent - */ +#[CoversClass(AbstractMetaDisplayEvent::class)] +#[CoversClass(CustomerMetaDisplayEvent::class)] class CustomerMetaDisplayEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/CustomerStatisticEventTest.php b/tests/Event/CustomerStatisticEventTest.php index df16075d..2c20acc1 100644 --- a/tests/Event/CustomerStatisticEventTest.php +++ b/tests/Event/CustomerStatisticEventTest.php @@ -13,11 +13,10 @@ use App\Entity\Customer; use App\Event\AbstractCustomerEvent; use App\Event\CustomerStatisticEvent; use App\Model\CustomerStatistic; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractCustomerEvent - * @covers \App\Event\CustomerStatisticEvent - */ +#[CoversClass(AbstractCustomerEvent::class)] +#[CoversClass(CustomerStatisticEvent::class)] class CustomerStatisticEventTest extends AbstractCustomerEventTestCase { protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent diff --git a/tests/Event/CustomerUpdatePostEventTest.php b/tests/Event/CustomerUpdatePostEventTest.php index 67b3db4b..4bc269ae 100644 --- a/tests/Event/CustomerUpdatePostEventTest.php +++ b/tests/Event/CustomerUpdatePostEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Customer; use App\Event\AbstractCustomerEvent; use App\Event\CustomerUpdatePostEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractCustomerEvent - * @covers \App\Event\CustomerUpdatePostEvent - */ +#[CoversClass(AbstractCustomerEvent::class)] +#[CoversClass(CustomerUpdatePostEvent::class)] class CustomerUpdatePostEventTest extends AbstractCustomerEventTestCase { protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent diff --git a/tests/Event/CustomerUpdatePreEventTest.php b/tests/Event/CustomerUpdatePreEventTest.php index 9c252fce..33a53537 100644 --- a/tests/Event/CustomerUpdatePreEventTest.php +++ b/tests/Event/CustomerUpdatePreEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Customer; use App\Event\AbstractCustomerEvent; use App\Event\CustomerUpdatePreEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractCustomerEvent - * @covers \App\Event\CustomerUpdatePreEvent - */ +#[CoversClass(AbstractCustomerEvent::class)] +#[CoversClass(CustomerUpdatePreEvent::class)] class CustomerUpdatePreEventTest extends AbstractCustomerEventTestCase { protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent diff --git a/tests/Event/DashboardEventTest.php b/tests/Event/DashboardEventTest.php index 81a9a04b..24cc1d68 100644 --- a/tests/Event/DashboardEventTest.php +++ b/tests/Event/DashboardEventTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Event; use App\Entity\User; use App\Event\DashboardEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\DashboardEvent - */ +#[CoversClass(DashboardEvent::class)] class DashboardEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/EmailEventTest.php b/tests/Event/EmailEventTest.php index 76ade176..1b35ee53 100644 --- a/tests/Event/EmailEventTest.php +++ b/tests/Event/EmailEventTest.php @@ -10,12 +10,11 @@ namespace App\Tests\Event; use App\Event\EmailEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\Mime\Email; -/** - * @covers \App\Event\EmailEvent - */ +#[CoversClass(EmailEvent::class)] class EmailEventTest extends TestCase { public function testGetter(): void diff --git a/tests/Event/EmailPasswordResetEventTest.php b/tests/Event/EmailPasswordResetEventTest.php index 53cc4c07..3a81b702 100644 --- a/tests/Event/EmailPasswordResetEventTest.php +++ b/tests/Event/EmailPasswordResetEventTest.php @@ -10,15 +10,16 @@ namespace App\Tests\Event; use App\Entity\User; +use App\Event\EmailEvent; use App\Event\EmailPasswordResetEvent; +use App\Event\UserEmailEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\Mime\Email; -/** - * @covers \App\Event\EmailEvent - * @covers \App\Event\UserEmailEvent - * @covers \App\Event\EmailPasswordResetEvent - */ +#[CoversClass(EmailEvent::class)] +#[CoversClass(UserEmailEvent::class)] +#[CoversClass(EmailPasswordResetEvent::class)] class EmailPasswordResetEventTest extends TestCase { public function testGetter(): void diff --git a/tests/Event/EmailSelfRegistrationEventTest.php b/tests/Event/EmailSelfRegistrationEventTest.php index 1e9b7e8c..11bca6df 100644 --- a/tests/Event/EmailSelfRegistrationEventTest.php +++ b/tests/Event/EmailSelfRegistrationEventTest.php @@ -10,15 +10,16 @@ namespace App\Tests\Event; use App\Entity\User; +use App\Event\EmailEvent; use App\Event\EmailSelfRegistrationEvent; +use App\Event\UserEmailEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\Mime\Email; -/** - * @covers \App\Event\EmailEvent - * @covers \App\Event\UserEmailEvent - * @covers \App\Event\EmailSelfRegistrationEvent - */ +#[CoversClass(EmailEvent::class)] +#[CoversClass(UserEmailEvent::class)] +#[CoversClass(EmailSelfRegistrationEvent::class)] class EmailSelfRegistrationEventTest extends TestCase { public function testGetter(): void diff --git a/tests/Event/InvoiceCreatedEventTest.php b/tests/Event/InvoiceCreatedEventTest.php index 5c0b9142..9aacd599 100644 --- a/tests/Event/InvoiceCreatedEventTest.php +++ b/tests/Event/InvoiceCreatedEventTest.php @@ -12,16 +12,16 @@ namespace App\Tests\Event; use App\Entity\Customer; use App\Entity\Invoice; use App\Entity\InvoiceTemplate; +use App\Event\AbstractInvoiceEvent; use App\Event\InvoiceCreatedEvent; use App\Repository\Query\InvoiceQuery; use App\Tests\Invoice\DebugFormatter; use App\Tests\Mocks\InvoiceModelFactoryFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\InvoiceCreatedEvent - * @covers \App\Event\AbstractInvoiceEvent - */ +#[CoversClass(InvoiceCreatedEvent::class)] +#[CoversClass(AbstractInvoiceEvent::class)] class InvoiceCreatedEventTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/InvoiceDeleteEventTest.php b/tests/Event/InvoiceDeleteEventTest.php index c94699e6..60563e6d 100644 --- a/tests/Event/InvoiceDeleteEventTest.php +++ b/tests/Event/InvoiceDeleteEventTest.php @@ -10,13 +10,13 @@ namespace App\Tests\Event; use App\Entity\Invoice; +use App\Event\AbstractInvoiceEvent; use App\Event\InvoiceDeleteEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\InvoiceDeleteEvent - * @covers \App\Event\AbstractInvoiceEvent - */ +#[CoversClass(InvoiceDeleteEvent::class)] +#[CoversClass(AbstractInvoiceEvent::class)] class InvoiceDeleteEventTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/InvoiceDocumentsEventTest.php b/tests/Event/InvoiceDocumentsEventTest.php index 02edae07..6f4c21f7 100644 --- a/tests/Event/InvoiceDocumentsEventTest.php +++ b/tests/Event/InvoiceDocumentsEventTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Event; use App\Event\InvoiceDocumentsEvent; use App\Model\InvoiceDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\InvoiceDocumentsEvent - */ +#[CoversClass(InvoiceDocumentsEvent::class)] class InvoiceDocumentsEventTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/InvoicePostRenderEventTest.php b/tests/Event/InvoicePostRenderEventTest.php index 8ddfaa31..671ebd50 100644 --- a/tests/Event/InvoicePostRenderEventTest.php +++ b/tests/Event/InvoicePostRenderEventTest.php @@ -17,12 +17,11 @@ use App\Repository\Query\InvoiceQuery; use App\Tests\Invoice\DebugFormatter; use App\Tests\Invoice\Renderer\DebugRenderer; use App\Tests\Mocks\InvoiceModelFactoryFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Response; -/** - * @covers \App\Event\InvoicePostRenderEvent - */ +#[CoversClass(InvoicePostRenderEvent::class)] class InvoicePostRenderEventTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/InvoicePreRenderEventTest.php b/tests/Event/InvoicePreRenderEventTest.php index b2c7bb36..8d00fc82 100644 --- a/tests/Event/InvoicePreRenderEventTest.php +++ b/tests/Event/InvoicePreRenderEventTest.php @@ -17,11 +17,10 @@ use App\Repository\Query\InvoiceQuery; use App\Tests\Invoice\DebugFormatter; use App\Tests\Invoice\Renderer\DebugRenderer; use App\Tests\Mocks\InvoiceModelFactoryFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\InvoicePreRenderEvent - */ +#[CoversClass(InvoicePreRenderEvent::class)] class InvoicePreRenderEventTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/PageActionsEventTest.php b/tests/Event/PageActionsEventTest.php index 6acc9d3a..f9670a46 100644 --- a/tests/Event/PageActionsEventTest.php +++ b/tests/Event/PageActionsEventTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Event; use App\Entity\User; use App\Event\PageActionsEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\PageActionsEvent - */ +#[CoversClass(PageActionsEvent::class)] class PageActionsEventTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/PermissionsEventTest.php b/tests/Event/PermissionsEventTest.php index e6080538..bb624505 100644 --- a/tests/Event/PermissionsEventTest.php +++ b/tests/Event/PermissionsEventTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Event; use App\Event\PermissionsEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\PermissionsEvent - */ +#[CoversClass(PermissionsEvent::class)] class PermissionsEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/PrepareUserEventTest.php b/tests/Event/PrepareUserEventTest.php index 008223de..87635887 100644 --- a/tests/Event/PrepareUserEventTest.php +++ b/tests/Event/PrepareUserEventTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Event; use App\Entity\User; use App\Event\PrepareUserEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\PrepareUserEvent - */ +#[CoversClass(PrepareUserEvent::class)] class PrepareUserEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/ProjectBudgetStatisticEventTest.php b/tests/Event/ProjectBudgetStatisticEventTest.php index 110e1dd1..8b6f29e5 100644 --- a/tests/Event/ProjectBudgetStatisticEventTest.php +++ b/tests/Event/ProjectBudgetStatisticEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Project; use App\Event\ProjectBudgetStatisticEvent; use App\Model\ProjectBudgetStatisticModel; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\ProjectBudgetStatisticEvent - */ +#[CoversClass(ProjectBudgetStatisticEvent::class)] class ProjectBudgetStatisticEventTest extends TestCase { public function testStatistic(): void diff --git a/tests/Event/ProjectCreateEventTest.php b/tests/Event/ProjectCreateEventTest.php index 7dd282a0..ab98cff2 100644 --- a/tests/Event/ProjectCreateEventTest.php +++ b/tests/Event/ProjectCreateEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Project; use App\Event\AbstractProjectEvent; use App\Event\ProjectCreateEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractProjectEvent - * @covers \App\Event\ProjectCreateEvent - */ +#[CoversClass(AbstractProjectEvent::class)] +#[CoversClass(ProjectCreateEvent::class)] class ProjectCreateEventTest extends AbstractProjectEventTestCase { protected function createProjectEvent(Project $project): AbstractProjectEvent diff --git a/tests/Event/ProjectCreatePostEventTest.php b/tests/Event/ProjectCreatePostEventTest.php index de432a7f..875a60b9 100644 --- a/tests/Event/ProjectCreatePostEventTest.php +++ b/tests/Event/ProjectCreatePostEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Project; use App\Event\AbstractProjectEvent; use App\Event\ProjectCreatePostEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractProjectEvent - * @covers \App\Event\ProjectCreatePostEvent - */ +#[CoversClass(AbstractProjectEvent::class)] +#[CoversClass(ProjectCreatePostEvent::class)] class ProjectCreatePostEventTest extends AbstractProjectEventTestCase { protected function createProjectEvent(Project $project): AbstractProjectEvent diff --git a/tests/Event/ProjectCreatePreEventTest.php b/tests/Event/ProjectCreatePreEventTest.php index 2be0a299..bc46b0c8 100644 --- a/tests/Event/ProjectCreatePreEventTest.php +++ b/tests/Event/ProjectCreatePreEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Project; use App\Event\AbstractProjectEvent; use App\Event\ProjectCreatePreEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractProjectEvent - * @covers \App\Event\ProjectCreatePreEvent - */ +#[CoversClass(AbstractProjectEvent::class)] +#[CoversClass(ProjectCreatePreEvent::class)] class ProjectCreatePreEventTest extends AbstractProjectEventTestCase { protected function createProjectEvent(Project $project): AbstractProjectEvent diff --git a/tests/Event/ProjectDetailControllerEventTest.php b/tests/Event/ProjectDetailControllerEventTest.php index aae60665..9a3b99e2 100644 --- a/tests/Event/ProjectDetailControllerEventTest.php +++ b/tests/Event/ProjectDetailControllerEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Project; use App\Event\AbstractProjectEvent; use App\Event\ProjectDetailControllerEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractProjectEvent - * @covers \App\Event\ProjectDetailControllerEvent - */ +#[CoversClass(AbstractProjectEvent::class)] +#[CoversClass(ProjectDetailControllerEvent::class)] class ProjectDetailControllerEventTest extends AbstractProjectEventTestCase { protected function createProjectEvent(Project $project): AbstractProjectEvent diff --git a/tests/Event/ProjectMetaDefinitionEventTest.php b/tests/Event/ProjectMetaDefinitionEventTest.php index 96a13e17..7bed5661 100644 --- a/tests/Event/ProjectMetaDefinitionEventTest.php +++ b/tests/Event/ProjectMetaDefinitionEventTest.php @@ -11,11 +11,10 @@ namespace App\Tests\Event; use App\Entity\Project; use App\Event\ProjectMetaDefinitionEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\ProjectMetaDefinitionEvent - */ +#[CoversClass(ProjectMetaDefinitionEvent::class)] class ProjectMetaDefinitionEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/ProjectMetaDisplayEventTest.php b/tests/Event/ProjectMetaDisplayEventTest.php index 8e6ee5c6..9c7ad1e3 100644 --- a/tests/Event/ProjectMetaDisplayEventTest.php +++ b/tests/Event/ProjectMetaDisplayEventTest.php @@ -10,15 +10,15 @@ namespace App\Tests\Event; use App\Entity\ProjectMeta; +use App\Event\AbstractMetaDisplayEvent; use App\Event\MetaDisplayEventInterface; use App\Event\ProjectMetaDisplayEvent; use App\Repository\Query\ProjectQuery; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\AbstractMetaDisplayEvent - * @covers \App\Event\ProjectMetaDisplayEvent - */ +#[CoversClass(AbstractMetaDisplayEvent::class)] +#[CoversClass(ProjectMetaDisplayEvent::class)] class ProjectMetaDisplayEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/ProjectMetaQueryDisplayTest.php b/tests/Event/ProjectMetaQueryDisplayTest.php index eafa46bd..93e0299f 100644 --- a/tests/Event/ProjectMetaQueryDisplayTest.php +++ b/tests/Event/ProjectMetaQueryDisplayTest.php @@ -13,11 +13,10 @@ use App\Entity\ProjectMeta; use App\Event\MetaDisplayEventInterface; use App\Event\ProjectMetaDisplayEvent; use App\Repository\Query\ProjectQuery; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\ProjectMetaDisplayEvent - */ +#[CoversClass(ProjectMetaDisplayEvent::class)] class ProjectMetaQueryDisplayTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/ProjectStatisticEventTest.php b/tests/Event/ProjectStatisticEventTest.php index 88ccdc2c..9d9a36a8 100644 --- a/tests/Event/ProjectStatisticEventTest.php +++ b/tests/Event/ProjectStatisticEventTest.php @@ -13,11 +13,10 @@ use App\Entity\Project; use App\Event\AbstractProjectEvent; use App\Event\ProjectStatisticEvent; use App\Model\ProjectStatistic; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractProjectEvent - * @covers \App\Event\ProjectStatisticEvent - */ +#[CoversClass(AbstractProjectEvent::class)] +#[CoversClass(ProjectStatisticEvent::class)] class ProjectStatisticEventTest extends AbstractProjectEventTestCase { protected function createProjectEvent(Project $project): AbstractProjectEvent diff --git a/tests/Event/ProjectUpdatePostEventTest.php b/tests/Event/ProjectUpdatePostEventTest.php index 439f3e2d..89393137 100644 --- a/tests/Event/ProjectUpdatePostEventTest.php +++ b/tests/Event/ProjectUpdatePostEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Project; use App\Event\AbstractProjectEvent; use App\Event\ProjectUpdatePostEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractProjectEvent - * @covers \App\Event\ProjectUpdatePostEvent - */ +#[CoversClass(AbstractProjectEvent::class)] +#[CoversClass(ProjectUpdatePostEvent::class)] class ProjectUpdatePostEventTest extends AbstractProjectEventTestCase { protected function createProjectEvent(Project $project): AbstractProjectEvent diff --git a/tests/Event/ProjectUpdatePreEventTest.php b/tests/Event/ProjectUpdatePreEventTest.php index 02d33a6a..f9b5fa3f 100644 --- a/tests/Event/ProjectUpdatePreEventTest.php +++ b/tests/Event/ProjectUpdatePreEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Project; use App\Event\AbstractProjectEvent; use App\Event\ProjectUpdatePreEvent; +use PHPUnit\Framework\Attributes\CoversClass; -/** - * @covers \App\Event\AbstractProjectEvent - * @covers \App\Event\ProjectUpdatePreEvent - */ +#[CoversClass(AbstractProjectEvent::class)] +#[CoversClass(ProjectUpdatePreEvent::class)] class ProjectUpdatePreEventTest extends AbstractProjectEventTestCase { protected function createProjectEvent(Project $project): AbstractProjectEvent diff --git a/tests/Event/RecentActivityEventTest.php b/tests/Event/RecentActivityEventTest.php index 3b6616bc..633d42cd 100644 --- a/tests/Event/RecentActivityEventTest.php +++ b/tests/Event/RecentActivityEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\Timesheet; use App\Entity\User; use App\Event\RecentActivityEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\RecentActivityEvent - */ +#[CoversClass(RecentActivityEvent::class)] class RecentActivityEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/ReportingEventTest.php b/tests/Event/ReportingEventTest.php index b4810bc5..bbc21dc0 100644 --- a/tests/Event/ReportingEventTest.php +++ b/tests/Event/ReportingEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Entity\User; use App\Event\ReportingEvent; use App\Reporting\Report; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\ReportingEvent - */ +#[CoversClass(ReportingEvent::class)] class ReportingEventTest extends TestCase { public function testGetterAndSetter(): void diff --git a/tests/Event/RevenueStatisticEventTest.php b/tests/Event/RevenueStatisticEventTest.php index 8c5fe570..cfc95d40 100644 --- a/tests/Event/RevenueStatisticEventTest.php +++ b/tests/Event/RevenueStatisticEventTest.php @@ -10,11 +10,10 @@ namespace App\Tests\Event; use App\Event\RevenueStatisticEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\RevenueStatisticEvent - */ +#[CoversClass(RevenueStatisticEvent::class)] class RevenueStatisticEventTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/SystemConfigurationEventTest.php b/tests/Event/SystemConfigurationEventTest.php index eb0c8e87..85d6b586 100644 --- a/tests/Event/SystemConfigurationEventTest.php +++ b/tests/Event/SystemConfigurationEventTest.php @@ -12,11 +12,10 @@ namespace App\Tests\Event; use App\Event\SystemConfigurationEvent; use App\Form\Model\Configuration; use App\Form\Model\SystemConfiguration; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\SystemConfigurationEvent - */ +#[CoversClass(SystemConfigurationEvent::class)] class SystemConfigurationEventTest extends TestCase { public function testDefaultValues(): void diff --git a/tests/Event/ThemeEventTest.php b/tests/Event/ThemeEventTest.php index 568c1962..65a509d2 100644 --- a/tests/Event/ThemeEventTest.php +++ b/tests/Event/ThemeEventTest.php @@ -11,11 +11,11 @@ namespace App\Tests\Event; use App\Entity\User; use App\Event\ThemeEvent; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; -/** - * @covers \App\Event\ThemeEvent - */ +#[CoversClass(ThemeEvent::class)] class ThemeEventTest extends TestCase { public function testEmpty(): void @@ -54,9 +54,7 @@ class ThemeEventTest extends TestCase self::assertEquals('foo