1 year ago

Error in unit test when using setUp() function

Posted 1 year ago by jay_singulara_tech

Getting an error after I add the setUp() function. Also, PHPStorm puts a red underline below the setUp() function name. The code looks to me, exactly like in the lesson but... I get this error from PHPUnit

Fatal error: Declaration of Tests\Unit\UserTest::setUp() must be compatible with Illuminate\Foundation\Testing\TestCase::setUp(): void in C:\Projects\MyProject\tests\Unit\UserTest.php on line 15

Please sign in or create an account to participate in this conversation.