當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Restaurant::getPhone方法代碼示例

本文整理匯總了PHP中Restaurant::getPhone方法的典型用法代碼示例。如果您正苦於以下問題:PHP Restaurant::getPhone方法的具體用法?PHP Restaurant::getPhone怎麽用?PHP Restaurant::getPhone使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Restaurant的用法示例。


在下文中一共展示了Restaurant::getPhone方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Cuisine

 function test_getPhone()
 {
     $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->getPhone();
     $this->assertEquals($phone, $result);
 }
開發者ID:jeffaustin81,項目名稱:Restaurants,代碼行數:15,代碼來源:RestaurantTest.php

示例2: Restaurant

 function test_getPhone()
 {
     //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->getPhone();
     //Assert
     $this->assertEquals($phone, $result);
 }
開發者ID:alexdbrown,項目名稱:best_restaurant,代碼行數:15,代碼來源:RestaurantTest.php

示例3: Cuisine

 function test_update()
 {
     $name = "Chinese";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     $place_name = "Happy House";
     $address = "4234 N Interstate Ave, Portland OR 97217";
     $phone = "503-287-9740";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($place_name, $id, $address, $phone, $cuisine_id);
     $test_restaurant->save();
     $new_place_name = "Very Happy House";
     $new_address = "5000 N Interstate Ave, Portland OR 97217";
     $new_phone = "503-287-9000";
     $test_restaurant->update($new_place_name, $new_address, $new_phone);
     $this->assertEquals("Very Happy House", $test_restaurant->getPlaceName());
     $this->assertEquals("5000 N Interstate Ave, Portland OR 97217", $test_restaurant->getAddress());
     $this->assertEquals("503-287-9000", $test_restaurant->getPhone());
 }
開發者ID:jschold,項目名稱:Best_Restaurants,代碼行數:20,代碼來源:RestaurantTest.php


注:本文中的Restaurant::getPhone方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。