当前位置: 首页>>代码示例>>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;未经允许,请勿转载。