Ejemplo n.º 1
0
 public function test_deleting_a_product_also_deletes_related_options()
 {
     $product = Factory::create(new Product());
     $product->options()->add(Factory::create(new Option()));
     $product->delete();
     $this->assertFalse(Option::where('product_id', $product->id)->exists());
 }