本文整理汇总了PHP中Restaurant::getWebsite方法的典型用法代码示例。如果您正苦于以下问题:PHP Restaurant::getWebsite方法的具体用法?PHP Restaurant::getWebsite怎么用?PHP Restaurant::getWebsite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Restaurant
的用法示例。
在下文中一共展示了Restaurant::getWebsite方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Restaurant
function test_getWebsite()
{
//Arrange
$restaurant_name = "VQ";
$phone = '5032277342';
$address = "1220 SW 1st Ave, Portland, OR 97204";
$website = "http://www.veritablequandary.com/";
$cuisine_id = 1;
$id = null;
$test_restaurant = new Restaurant($restaurant_name, $phone, $address, $website, $cuisine_id, $id);
//Act
$result = $test_restaurant->getWebsite();
//Assert
$this->assertEquals($website, $result);
}
示例2: Cuisine
function test_getWebsite()
{
$type = "Thai";
$id = null;
$test_Cuisine = new Cuisine($type, $id);
$test_Cuisine->save();
$name = "Pok Pok";
$phone = "555-456-2345";
$address = "123 abcd street";
$website = "http://www.helloworld.com";
$cuisine_id = $test_Cuisine->getId();
$test_Restaurant = new Restaurant($name, $id, $phone, $address, $website, $cuisine_id);
$result = $test_Restaurant->getWebsite();
$this->assertEquals($website, $result);
}