Level 41
I don't think we need a test case for a relationship. Relationships are part of the framework and already tested.
Summer Sale! All accounts are 50% off this week.
A test that validates if a certain model has relationship to another model, like the test bellow, should be inside Unit or Feature tests?
public function it_belongs_to_an_event()
{
$ticket = Ticket::factory()->create();
$this->assertInstanceOf(Event::class, $ticket->event);
}
Please or to participate in this conversation.