本文整理匯總了PHP中Restaurant::updateRestaurant方法的典型用法代碼示例。如果您正苦於以下問題:PHP Restaurant::updateRestaurant方法的具體用法?PHP Restaurant::updateRestaurant怎麽用?PHP Restaurant::updateRestaurant使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Restaurant
的用法示例。
在下文中一共展示了Restaurant::updateRestaurant方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Cuisine
function test_restaurant_update()
{
//Arrange
$style = "Thai";
$test_cuisine = new Cuisine($style);
$test_cuisine->save();
$name = "Pok Pok";
$cuisine_id = $test_cuisine->getId();
$stars = 4;
$website = "www.pokpokpdx.com";
$phone = "503 232 1387";
$tr = new Restaurant($name, $cuisine_id, $stars, $website, $phone);
$tr->save();
$new_name = "Pok Pok Noi";
$new_cuisine_id = $test_cuisine->getId();
$new_id = $new_stars = 7;
$new_website = "balls";
$new_phone = "503 555 5555";
//Act
$tr->updateRestaurant($new_name, $tr->getCuisineId(), $tr->getID(), $new_stars, $new_website, $new_phone);
//Assert
$this->assertEquals(7, $tr->getStars(), "OH NO");
}