Skip to content

[Form] Bad setUp prototype in form unit testing #14245

@ruano-a

Description

@ruano-a

In this page https://symfony.com/doc/current/form/unit_testing.html#testings-types-registered-as-services

The function setUp is not defined with a void return type.
This causes an error :

Fatal error: Declaration of App\Tests\Unit\Form\MyTest::setUp() must be compatible with Symfony\Component\Form\Test\TypeTestCase::setUp(): void in MyTest.php

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions