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


PHP Restaurant::deleteAll方法代碼示例

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


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

示例1: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $id = null;
     $name = "Taco Restaurant";
     $phone = "(503) 777-9097";
     $address = "7000 Beaverton Hillsdale HWY, Portland, OR 97221";
     $hours = "7am - 2am";
     $cuisine_id = 7;
     $test_restaurant = new Restaurant($id, $name, $phone, $address, $hours, $cuisine_id);
     $test_restaurant->save();
     $id2 = null;
     $name2 = "Taco Johns";
     $phone2 = "(717) 792-1012";
     $address2 = "901 Mississippi St, Portland, OR 97221";
     $hours2 = "8am - 10pm";
     $cuisine_id2 = 3;
     $test_restaurant2 = new Restaurant($id2, $name2, $phone2, $address2, $hours2, $cuisine_id2);
     $test_restaurant2->save();
     //Act
     Restaurant::deleteAll();
     //Assert
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:austinblanchard,項目名稱:best_restaurants,代碼行數:25,代碼來源:RestaurantTest.php

示例2: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $restaurant_name = "Joes Burgers";
     $restaurant_name2 = "McDonalds";
     $test_Restaurant = new Restaurant($restaurant_name);
     $test_Restaurant->save();
     $test_Restaurant2 = new Restaurant($restaurant_name2);
     $test_Restaurant2->save();
     //Act
     Restaurant::deleteAll();
     $result = Restaurant::getAll();
     //Assert
     $this->assertEquals([], $result);
 }
開發者ID:kennygrage,項目名稱:epicRestaurant,代碼行數:15,代碼來源:RestaurantTest.php

示例3: test_restaurant_deleteAll

 function test_restaurant_deleteAll()
 {
     //Arrange
     $style = "Thai";
     $test_cuisine = new Cuisine($style);
     $test_cuisine->save();
     $name = "Pok Pok";
     $category_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($name, $category_id);
     $test_restaurant->save();
     $name2 = "Mai Thai";
     $category_id = $test_cuisine->getId();
     $test_restaurant2 = new Restaurant($name2, $category_id);
     $test_restaurant2->save();
     //Act
     Restaurant::deleteAll();
     //Assert
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:umamiMike,項目名稱:restaurantApp,代碼行數:20,代碼來源:RestaurantTest.php

示例4: test_deleteAll

 function test_deleteAll()
 {
     $name = "Asian";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     $restaurant_name = "The Golden Duck";
     $location = "898 SW 5th Ave, Portland, OR";
     $description = "A Chill Asian experince";
     $price = "\$\$";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($restaurant_name, $location, $description, $price, $cuisine_id);
     $test_restaurant->save();
     $restaurant_name2 = "The Red Dragon";
     $location2 = "899 SW 5th Ave, Portland, OR";
     $description2 = "A Intense Asian experince";
     $price2 = "\$\$\$";
     $cuisine_id2 = $test_cuisine->getId();
     $test_restaurant2 = new Restaurant($restaurant_name2, $location2, $description2, $price2, $cuisine_id2);
     $test_restaurant2->save();
     Restaurant::deleteAll();
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:juliocesardiaz,項目名稱:Best-restaurants,代碼行數:24,代碼來源:RestaurantTest.php

示例5: tearDown

 protected function tearDown()
 {
     User::deleteAll();
     Response::deleteAll();
     Restaurant::deleteAll();
 }
開發者ID:AbeerKhakwani,項目名稱:attending-,代碼行數:6,代碼來源:UserTest.php

示例6: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $flavor = "Burgers";
     $id = null;
     $test_cuisine = new Cuisine($flavor, $id);
     $test_cuisine->save();
     $name = "Burger Bash";
     $phone_number = "555-666-7777";
     $address = "8020 Ground Chuck";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($name, $phone_number, $address, $id, $cuisine_id);
     $test_restaurant->save();
     $name2 = "Pizza Party";
     $phone_number2 = "555-666-7747";
     $address2 = "1234 Pepperoni Lane";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant2 = new Restaurant($name2, $phone_number2, $address2, $id, $cuisine_id);
     $test_restaurant2->save();
     //Act
     Restaurant::deleteAll();
     //Assert
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:JordanNavratil,項目名稱:Best_Restaurant,代碼行數:25,代碼來源:RestaurantTest.php

示例7: tearDown

 protected function tearDown()
 {
     Allergen::deleteAll();
     Restaurant::deleteAll();
 }
開發者ID:Camolot,項目名稱:allergen_avoider,代碼行數:5,代碼來源:AllergenTest.php

示例8: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $name = "Drinks";
     $id = null;
     $test_Cuisine = new Cuisine($name, $id);
     $test_Cuisine->save();
     $restaurant = "Aalto";
     $address = "123 Belmont";
     $phone = "123-456-7890";
     $cuisine_id = $test_Cuisine->getId();
     $test_restaurant = new Restaurant($restaurant, $address, $phone, $cuisine_id, $id);
     $test_restaurant->save();
     $restaurant2 = "HobNob";
     $address2 = "999 somewhere";
     $phone2 = "234-555-5555";
     $cuisine_id2 = $test_Cuisine->getId();
     $test_restaurant2 = new Restaurant($restaurant, $address, $phone, $cuisine_id, $id);
     $test_restaurant2->save();
     //Act
     Restaurant::deleteAll();
     //Assert
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:sammartinez,項目名稱:restaurant_project,代碼行數:25,代碼來源:RestaurantTest.php

示例9: test_deleteAll

 function test_deleteAll()
 {
     //arrange
     $type = "Tacos";
     $id = null;
     $test_cuisine = new Cuisine($type, $id);
     $test_cuisine->save();
     $name = "Nathans";
     $cuisine_id = $test_cuisine->getId();
     $price_range = 1;
     $neighborhood = "Felony Flats";
     $test_restaurant = new Restaurant($name, $id, $cuisine_id, $price_range, $neighborhood);
     $test_restaurant->save();
     $name2 = "Joses";
     $price_range = 2;
     $neighborhood = "Buckman";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant2 = new Restaurant($name2, $id, $cuisine_id, $price_range, $neighborhood);
     $test_restaurant2->save();
     //act
     Restaurant::deleteAll();
     //assert
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:nathanhwyoung,項目名稱:restaurant,代碼行數:25,代碼來源:RestaurantTest.php

示例10: test_deleteAll

 function test_deleteAll()
 {
     $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();
     $place_name2 = "Golden Dragon";
     $address2 = "324 SW 3rd Ave, Portland, OR 97204";
     $phone2 = "503-274-1900";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant2 = new Restaurant($place_name2, $id, $address2, $phone2, $cuisine_id);
     $test_restaurant2->save();
     Restaurant::deleteAll();
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:jschold,項目名稱:Best_Restaurants,代碼行數:22,代碼來源:RestaurantTest.php

示例11: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $name = "Italian";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     $name = "Piazza Italia";
     $rating = 1;
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($name, $id, $cuisine_id, $rating);
     $test_restaurant->save();
     $name2 = "Ristorante Roma";
     $rating = 1;
     $test_restaurant2 = new Restaurant($name2, $id, $cuisine_id, $rating);
     $test_restaurant2->save();
     //Act
     Restaurant::deleteAll();
     //Assert
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:anniehoogendoorn,項目名稱:BestRestaurants,代碼行數:22,代碼來源:RestaurantTest.php

示例12: testDeleteAll

 function testDeleteAll()
 {
     //Arrange
     $type = "Italian";
     $id = null;
     $test_cuisine = new Cuisine($type, $id);
     $test_cuisine->save();
     $name = "City Chinese";
     $description = "OK Chinese food";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($description, $id, $cuisine_id, $name);
     $test_restaurant->save();
     $name2 = "City Mexican";
     $description2 = "OK Mexican food";
     $test_restaurant2 = new Restaurant($description2, $id, $cuisine_id, $name2);
     $test_restaurant2->save();
     //Assert
     Restaurant::deleteAll();
     //Assert
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:r-hills,項目名稱:Restaurant_Reviews,代碼行數:22,代碼來源:RestaurantTest.php

示例13: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $restaurant_name = "VQ";
     $phone = '5032277342';
     $address = "1220 SW 1st Ave, Portland, OR 97204";
     $website = "http://www.veritablequandary.com/";
     $id = null;
     $cuisine_id = null;
     $test_restaurant = new Restaurant($restaurant_name, $phone, $address, $website, $cuisine_id, $id);
     $test_restaurant->save();
     $restaurant_name2 = "Hot Lips Pizza";
     $phone2 = '5035952342';
     $address2 = "721 NW 9th Ave #150, Portland, OR 97209";
     $website2 = "http://hotlipspizza.com/";
     $id2 = null;
     $cuisine_id2 = null;
     $test_restaurant2 = new Restaurant($restaurant_name2, $phone2, $address2, $website2, $cuisine_id2, $id2);
     $test_restaurant2->save();
     //Act
     Restaurant::deleteAll();
     //Assert
     $result = Restaurant::getAll();
     $this->assertEquals([], $result);
 }
開發者ID:alexdbrown,項目名稱:best_restaurant,代碼行數:25,代碼來源:RestaurantTest.php

示例14: test_deleteAll

 function test_deleteAll()
 {
     //cuisine
     $name = "Japanese";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     //restaurant1
     $name = "Good Fortune";
     $description = "very tasty.";
     $address = "1111 SW 11th Ave";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($name, $id, $cuisine_id, $description, $address);
     $test_restaurant->save();
     //restaurant2
     $name2 = "Good Luck";
     $description2 = "very yummy.";
     $address2 = "2222 SW 12th Ave";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant2 = new Restaurant($name2, $id, $cuisine_id, $description2, $address2);
     $test_restaurant2->save();
     Restaurant::deleteAll();
     $result = Restaurant::getAll();
     $this->AssertEquals([], $result);
 }
開發者ID:Camolot,項目名稱:restaurants,代碼行數:25,代碼來源:RestaurantTest.php

示例15: tearDown

 protected function tearDown()
 {
     Cuisine::deleteAll();
     Restaurant::deleteAll();
     Review::deleteAll();
 }
開發者ID:jeffaustin81,項目名稱:Restaurants,代碼行數:6,代碼來源:ReviewTest.php


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