jay_singulara_tech
7 months ago
1142
4
Laravel

Error in unit test when using setUp() function

Posted 7 months 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.