Error in Filament with PestPHP using form select in resource and enum
I'm creating a project using Filament, Laravel 11 and PestPHP. I'm having problems running the test. the following error appears: " FAILED Tests\Feature\EntesTest >
Component has errors: "data.nature"
Failed asserting that false is true.".
I don't understand the reason for the error, as I am sending the 'nature' field in the fillForm. How to resolve this error?
=======>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Follow the code in the attached file.
CREATE - admin/entes/create → it must test the creation of an entityComponent has errors: "data.nature"
Failed asserting that false is true.".
I don't understand the reason for the error, as I am sending the 'nature' field in the fillForm. How to resolve this error?
=======>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Follow the code in the attached file.
Solution
The
However, when you update the connection information in
fillForm function is a helper that calls another method, fillFormDataForTesting (after V3.2.77). This method checks the runningUnitTests() status. According to your test configuration, it was returning false.However, when you update the connection information in
phpunit.xml as previously suggested, runningUnitTests() returns true