Пример #1
0
 function test_update_restaurant()
 {
     $type = "Thai";
     $id = null;
     $test_Cuisine = new Cuisine($type, $id);
     $test_Cuisine->save();
     $type2 = "Bar";
     $test_Cuisine2 = new Cuisine($type2, $id);
     $test_Cuisine2->save();
     $test_Restaurant = new Restaurant("Pok Pok", $id, "555-456-2345", "123 abcd street", "http://www.helloworld.com", $test_Cuisine->getId());
     $new_name = "Whiskey Soda Lounge";
     $new_phone = "555-555-5555";
     $new_address = "678 DEF street";
     $new_website = "http://www.pokpok.com";
     $new_cuisine_id = $test_Cuisine2->getId();
     $new_Restaurant = new Restaurant($new_name, $id, $new_phone, $new_address, $new_website, $new_cuisine_id);
     $test_Restaurant->update_restaurant($new_name, $id, $new_phone, $new_address, $new_website, $new_cuisine_id);
     $this->assertEquals($new_Restaurant, $test_Restaurant);
 }