Skip to content

Chore(test) - Make test classes to be final #2969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ services:
php:
container_name: symfony-backend-php-fpm
hostname: php-fpm
stop_signal: SIGKILL
build:
context: .
dockerfile: ./Dockerfile_dev
Expand All @@ -26,6 +27,7 @@ services:
nginx:
container_name: symfony-backend-nginx
hostname: nginx
stop_signal: SIGKILL
build:
context: ./docker/nginx/
dockerfile: ./Dockerfile_dev
Expand All @@ -44,6 +46,7 @@ services:
mariadb:
container_name: symfony-backend-mariadb
hostname: mariadb
stop_signal: SIGKILL
build:
context: ./docker/mariadb/
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
Expand All @@ -58,6 +61,7 @@ services:
container_name: symfony-backend-dozzle
hostname: dozzle
image: amir20/dozzle
stop_signal: SIGKILL
ports:
- "8100:8080"
volumes:
Expand All @@ -67,6 +71,7 @@ services:
container_name: symfony-backend-adminer
hostname: adminer
image: adminer
stop_signal: SIGKILL
environment:
ADMINER_DEFAULT_SERVER: mariadb
ADMINER_DESIGN: pepa-linha-dark
Expand Down
6 changes: 5 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
</errorLevel>
</ArgumentTypeCoercion>

<ClassMustBeFinal errorLevel="suppress" />
<ClassMustBeFinal>
<errorLevel type="suppress">
<directory name="src" />
</errorLevel>
</ClassMustBeFinal>

<ImplicitToStringCast>
<errorLevel type="suppress">
Expand Down
2 changes: 1 addition & 1 deletion tests/DataFixtures/AppFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @package App\DataFixtures
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class AppFixtures extends Fixture
final class AppFixtures extends Fixture
{
#[Override]
public function load(ObjectManager $manager): void
Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/HealthzControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package App\Tests\E2E\Controller
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class HealthzControllerTest extends WebTestCase
final class HealthzControllerTest extends WebTestCase
{
/**
* @throws Throwable
Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/IndexControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @package App\Tests\E2E\Controller
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class IndexControllerTest extends WebTestCase
final class IndexControllerTest extends WebTestCase
{
/**
* @throws Throwable
Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/VersionControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @package App\Tests\E2E\Controller
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class VersionControllerTest extends WebTestCase
final class VersionControllerTest extends WebTestCase
{
/**
* @throws Throwable
Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/ApiKey/ApiKeyControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @package App\Tests\E2E\Controller\v1\ApiKey
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class ApiKeyControllerTest extends WebTestCase
final class ApiKeyControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/api_key';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/Auth/GetTokenControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package App\Tests\E2E\Controller\v1\Auth
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class GetTokenControllerTest extends WebTestCase
final class GetTokenControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/auth/get_token';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/Auth/LoginFailureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @package App\Tests\E2E\Controller\v1\Auth
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class LoginFailureTest extends WebTestCase
final class LoginFailureTest extends WebTestCase
{
private string $baseUrl = '/v1/auth/get_token';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @package App\Tests\E2E\Controller\v1\Localization
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class LanguageControllerTest extends WebTestCase
final class LanguageControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/localization/language';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @package App\Tests\E2E\Controller\v1\Localization
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class LocaleControllerTest extends WebTestCase
final class LocaleControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/localization/locale';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @package App\Tests\E2E\Controller\v1\Localization
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class TimeZoneControllerTest extends WebTestCase
final class TimeZoneControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/localization/timezone';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/Profile/GroupsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @package App\Tests\E2E\Controller\v1\Profile
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class GroupsControllerTest extends WebTestCase
final class GroupsControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/profile/groups';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/Profile/IndexControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @package App\Tests\E2E\Controller\v1\Profile
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class IndexControllerTest extends WebTestCase
final class IndexControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/profile';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/Profile/RolesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @package App\Tests\E2E\Controller\v1\Profile
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class RolesControllerTest extends WebTestCase
final class RolesControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/profile/roles';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/Role/FindOneRoleControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @package App\Tests\E2E\Controller\v1\Role
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class FindOneRoleControllerTest extends WebTestCase
final class FindOneRoleControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/role';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package App\Tests\E2E\Controller\v1\Role
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class InheritedRolesControllerTest extends WebTestCase
final class InheritedRolesControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/role';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/Role/RoleControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @package App\Tests\E2E\Controller\v1\Role
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class RoleControllerTest extends WebTestCase
final class RoleControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/role';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class AttachUserGroupControllerTest extends WebTestCase
final class AttachUserGroupControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/User/DeleteUserControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class DeleteUserControllerTest extends WebTestCase
final class DeleteUserControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class DetachUserGroupControllerTest extends WebTestCase
final class DetachUserGroupControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/User/UserControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UserControllerTest extends WebTestCase
final class UserControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/User/UserCreateInvalidUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UserCreateInvalidUserTest extends WebTestCase
final class UserCreateInvalidUserTest extends WebTestCase
{
/**
* @throws Throwable
Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/User/UserGroupsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UserGroupsControllerTest extends WebTestCase
final class UserGroupsControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/User/UserManagementFlowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UserManagementFlowTest extends WebTestCase
final class UserManagementFlowTest extends WebTestCase
{
private string $baseUrl = '/v1/user';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/User/UserRolesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UserRolesControllerTest extends WebTestCase
final class UserRolesControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/User/UserUpdateInvalidUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @package App\Tests\E2E\Controller\v1\User
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UserUpdateInvalidUserTest extends WebTestCase
final class UserUpdateInvalidUserTest extends WebTestCase
{
/**
* @throws Throwable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @package App\Tests\E2E\Controller\v1\UserGroup
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class AttachUserControllerTest extends WebTestCase
final class AttachUserControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user_group';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @package App\Tests\E2E\Controller\v1\UserGroup
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class DetachUserControllerTest extends WebTestCase
final class DetachUserControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user_group';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @package App\Tests\E2E\Controller\v1\UserGroup
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UserGroupControllerTest extends WebTestCase
final class UserGroupControllerTest extends WebTestCase
{
private string $baseUrl = '/v1/user_group';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Controller/v1/UserGroup/UsersControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package App\Tests\E2E\Controller\v1\UserGroup
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UsersControllerTest extends WebTestCase
final class UsersControllerTest extends WebTestCase
{
/**
* @throws Throwable
Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/DocumentationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @package App\Tests\Functional
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class DocumentationTest extends WebTestCase
final class DocumentationTest extends WebTestCase
{
/**
* @throws Throwable
Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Rest/ResourceLifeCycleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package App\Tests\E2E\Rest
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class ResourceLifeCycleTest extends WebTestCase
final class ResourceLifeCycleTest extends WebTestCase
{
/**
* @throws Throwable
Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Rest/Traits/Actions/AdminActionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package App\Tests\E2E\Rest\Traits\Actions
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class AdminActionsTest extends RestTraitTestCase
final class AdminActionsTest extends RestTraitTestCase
{
protected static string $route = '/test_admin_actions';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Rest/Traits/Actions/AnonActionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package App\Tests\E2E\Rest\Traits\Actions
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class AnonActionsTest extends RestTraitTestCase
final class AnonActionsTest extends RestTraitTestCase
{
protected static string $route = '/test_anon_actions';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Rest/Traits/Actions/AuthenticatedActionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package App\Tests\E2E\Rest\Traits\Actions
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class AuthenticatedActionsTest extends RestTraitTestCase
final class AuthenticatedActionsTest extends RestTraitTestCase
{
protected static string $route = '/test_authenticated_actions';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Rest/Traits/Actions/LoggedActionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package App\Tests\E2E\Rest\Traits\Actions
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class LoggedActionsTest extends RestTraitTestCase
final class LoggedActionsTest extends RestTraitTestCase
{
protected static string $route = '/test_logged_actions';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Rest/Traits/Actions/RootActionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package App\Tests\E2E\Rest\Traits\Actions
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class RootActionsTest extends RestTraitTestCase
final class RootActionsTest extends RestTraitTestCase
{
protected static string $route = '/test_root_actions';

Expand Down
2 changes: 1 addition & 1 deletion tests/E2E/Rest/Traits/Actions/UserActionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package App\Tests\E2E\Rest\Traits\Actions
* @author TLe, Tarmo Leppänen <[email protected]>
*/
class UserActionsTest extends RestTraitTestCase
final class UserActionsTest extends RestTraitTestCase
{
protected static string $route = '/test_user_actions';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
path: '/test_admin_actions',
)]
#[IsGranted(AuthenticatedVoter::IS_AUTHENTICATED_FULLY)]
class AdminActionsController extends Controller
final class AdminActionsController extends Controller
{
use Actions\CountAction;
use Actions\CreateAction;
Expand Down
Loading
Loading