当前位置: 首页>>代码示例>>PHP>>正文


PHP Review::deleteAll方法代码示例

本文整理汇总了PHP中Review::deleteAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Review::deleteAll方法的具体用法?PHP Review::deleteAll怎么用?PHP Review::deleteAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Review的用法示例。


在下文中一共展示了Review::deleteAll方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 protected function tearDown()
 {
     Cuisine::deleteAll();
     Restaurant::deleteAll();
     Review::deleteAll();
 }
开发者ID:jeffaustin81,项目名称:Restaurants,代码行数:6,代码来源:ReviewTest.php

示例2: tearDown

 protected function tearDown()
 {
     Bathroom::deleteAll();
     Review::deleteAll();
 }
开发者ID:jeffaustin81,项目名称:tinklr-dev,代码行数:5,代码来源:BathroomTest.php

示例3: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $beer_id = 1;
     $user_id = 1;
     $review = "Great beer";
     $date = "2015-10-08";
     $id = 3;
     $test_review = new Review($beer_id, $user_id, $review, $date, $id);
     $test_review->save();
     //Act
     $test = Review::deleteAll();
     $result = Review::getAll();
     //Assert
     $this->assertEquals([], $result);
 }
开发者ID:bborealis,项目名称:growler,代码行数:16,代码来源:ReviewTest.php

示例4: test_deleteAll

 function test_deleteAll()
 {
     //cuisine
     $name = "Japanese";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     //restaurant
     $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();
     //review1
     $username = "Ben";
     $date = 00 - 00 - 00;
     $rating = 5;
     $comment = "good one.";
     $restaurant_id = $test_restaurant->getId();
     $test_review = new Review($username, $date, $rating, $comment, $restaurant_id, $id);
     //review2
     $username2 = "Jen";
     $date2 = 1111 - 00 - 00;
     $rating2 = 2;
     $comment2 = "Bad one.";
     $restaurant_id = $test_restaurant->getId();
     $test_review2 = new Review($username2, $date2, $rating2, $comment2, $restaurant_id, $id);
     Review::deleteAll();
     $result = Review::getAll();
     $this->AssertEquals([], $result);
 }
开发者ID:Camolot,项目名称:restaurants,代码行数:32,代码来源:ReviewTest.php

示例5: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $rating = 1;
     $comment = "This place sucks!";
     $id = null;
     $test_review = new Review($rating, $comment, $id);
     $test_review->save();
     $rating2 = 2;
     $comment2 = "This place smells!";
     $id2 = null;
     $test_review2 = new Review($rating2, $comment2, $id2);
     $test_review2->save();
     //Act
     Review::deleteAll();
     //Assert
     $result = Review::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:jeffaustin81,项目名称:tinklr-dev,代码行数:19,代码来源:ReviewTest.php

示例6: 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();
     $user = "yoloswag1959";
     $stars = 3;
     $headline = "It is aight.";
     $body = "Yeah, pretty aight bro";
     $restaurant_id = $test_restaurant->getId();
     $test_review = new Review($user, $stars, $headline, $body, $restaurant_id);
     $test_review->save();
     $user2 = "6969babygirl";
     $stars2 = 3;
     $headline2 = "XOXO";
     $body2 = "I cant even";
     $restaurant_id2 = $test_restaurant->getId();
     $test_review2 = new Review($user2, $stars2, $headline2, $body2, $restaurant_id2);
     $test_review2->save();
     Review::deleteAll();
     $result = Review::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:juliocesardiaz,项目名称:Best-restaurants,代码行数:31,代码来源:ReviewTest.php


注:本文中的Review::deleteAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。