create(); $record = $this->factory()->ingredient($ingredient)->create(); $this->getRelatedData($record, 'ingredient', 'foods'); } public function testCanIncludeRelatedIngredient(): void { $ingredient = Recipe::factory()->create(); $record = $this->factory()->ingredient($ingredient)->create(); $this->getRelatedData($record, 'ingredient', 'recipes'); } public function testCanGetRelatedParent(): void { $parent = Recipe::factory()->create(); $record = $this->factory()->parent($parent)->create(); $this->getRelatedData($record, 'parent', 'recipes'); } public function testCanIncludeRelatedParent(): void { $parent = JournalEntry::factory()->create(); $record = $this->factory()->parent($parent)->create(); $this->getRelatedData($record, 'parent', 'journal-entries'); } }