コード例 #1
0
 /**
  * @expectedException \Exception
  */
 public function testOneToOneReverseException()
 {
     $place = new Place();
     $place->name = 'Derry';
     $place->save();
     $place2 = new Place();
     $place2->name = 'Dallas';
     $place2->save();
     $restaurant = new Restaurant();
     $restaurant->name = 'Burger mix';
     $restaurant->place = $place;
     $restaurant->save();
     $restaurant2 = new Restaurant();
     $restaurant2->name = 'Cat Burger';
     $restaurant2->place = $place2;
     $restaurant2->save();
     $place->restaurant = $restaurant2;
     $place->save();
 }