Level 102
Did you import project at the top?
use App\Project;
1 like
Summer Sale! All accounts are 50% off this week.
Hello everyone,
I'm trying to follow along with "Build a Laravel App with TDD" on Laravel 6.x.
I've already figured out that I need to change the TestCast back to 'Tests\TestCase' for many things in the tutorial to work, but this particular issue has me stuck.
/** @test */
public function a_task_belongs_to_a_project()
{
$task = factory(Task::class)->create();
$this->assertInstanceOf(Project::class, $task->project);
}
When I run this, my output is:
There was 1 error:
1) Tests\Unit\TaskTest::a_task_belongs_to_a_project
PHPUnit\Framework\InvalidArgumentException: Argument #1 of PHPUnit\Framework\Assert::assertInstanceOf() must be a class or interface name
What could be happening here?
Please or to participate in this conversation.