Ejemplo n.º 1
0
 function testDeleteCuisineRestaraunts()
 {
     //Arrange
     $cuisine_name = "Italian";
     $id = null;
     $test_cuisine = new Cuisine($cuisine_name, $id);
     $test_cuisine->save();
     $restaraunt_name = "Big Bubba/'s Tuscan Pizza";
     $cuisine_id = $test_cuisine->getId();
     $test_restaraunt = new Restaraunt($restaraunt_name, $id, $cuisine_id);
     $test_restaraunt->save();
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([], Restaraunt::getAll());
 }
Ejemplo n.º 2
0
 function testDeleteCuisineRestaurants()
 {
     //Arrange
     $flavor = "Pizza";
     $id = null;
     $test_cuisine = new Cuisine($flavor, $id);
     $test_cuisine->save();
     $name = "Pizza Party";
     $phone_number = "123-123-1234";
     $address = "1234 Pepporoni Lane";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($name, $phone_number, $address, $id, $cuisine_id);
     $test_restaurant->save();
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([], Restaurant::getAll());
 }
Ejemplo n.º 3
0
 function test_cuisine_delete()
 {
     $style = "Thai";
     $test_cuisine = new Cuisine($style);
     $test_cuisine->save();
     $style2 = "burgers";
     $test_cuisine2 = new Cuisine($style2);
     $test_cuisine2->save();
     $name = "Pok Pok";
     $category_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($name, $category_id);
     $test_restaurant->save();
     $name2 = "Dicks";
     $category_id2 = $test_cuisine2->getId();
     $test_restaurant2 = new Restaurant($name2, $category_id2);
     $test_restaurant2->save();
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([$test_restaurant2], Restaurant::getAll());
 }
 function testDeleteCuisineRestaurants()
 {
     //Arrange
     $name = "Italian";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     $name = "Piazza Italia";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($name, $id, $cuisine_id, $rating);
     $test_restaurant->save();
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([], Restaurant::getAll());
 }
Ejemplo n.º 5
0
 function test_delete()
 {
     //Arrange
     $test_cuisine = new Cuisine("american", false, 4);
     $test_cuisine->save();
     //Act
     $test_cuisine->delete();
     $result = Cuisine::getAll();
     //Assert
     $this->assertEquals([], $result);
 }
Ejemplo n.º 6
0
 function test_DeleteCuisineRestaurantsReviews()
 {
     //Arrange
     //cuisine
     $name = "Japanese";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     //restaurant
     $name = "Good Fortune";
     $cuisine_id = $test_cuisine->getId();
     $description = "very tasty.";
     $address = "1111 SW 11th Ave";
     $test_restaurant = new Restaurant($name, $id, $cuisine_id, $description, $address);
     $test_restaurant->save();
     //review
     $username = "******";
     $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);
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([], Review::getAll());
 }
Ejemplo n.º 7
0
 function test_DeleteCuisineRestaurants()
 {
     //Arrange
     //cuisine
     $name = "Japanese";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     //restaurant
     $name = "Good Fortune";
     $cuisine_id = $test_cuisine->getId();
     $description = "very tasty.";
     $address = "1111 SW 11th Ave";
     $test_restaurant = new Restaurant($name, $id, $cuisine_id, $description, $address);
     $test_restaurant->save();
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([], Restaurant::getAll());
 }
Ejemplo n.º 8
0
 function testDelete()
 {
     //Arrange
     $name = "burgers";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     $name2 = "sushi";
     $test_cuisine2 = new Cuisine($name2, $id);
     $test_cuisine2->save();
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([$test_cuisine2], Cuisine::getAll());
 }
Ejemplo n.º 9
0
 function testDelete()
 {
     //Arrange
     $type = "Italian";
     $id = null;
     $test_cuisine = new Cuisine($type, $id);
     $test_cuisine->save();
     $type2 = "Japanese";
     $test_cuisine2 = new Cuisine($type2, $id);
     $test_cuisine2->save();
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([$test_cuisine2], Cuisine::getAll());
 }
Ejemplo n.º 10
0
 function test_delete()
 {
     $name = "Chinese";
     $id = null;
     $test_cuisine = new Cuisine($name, $id);
     $test_cuisine->save();
     $name2 = "Greek";
     $test_cuisine2 = new Cuisine($name2, $id);
     $test_cuisine2->save();
     $test_cuisine->delete();
     $this->assertEquals([$test_cuisine2], Cuisine::getAll());
 }
Ejemplo n.º 11
0
 function test_delete()
 {
     $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();
     $user = "******";
     $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();
     $test_cuisine->delete();
     $result = Review::getAll();
     //var_dump($result);
     $this->assertEquals([], $result);
 }
 function test_DeleteCuisineRestaurants()
 {
     //Arrange
     $id = null;
     $cuisine_type = "Brazilian";
     $test_cuisine_type = new Cuisine($id, $cuisine_type);
     $name = "Peles Brazilian Buffet";
     $phone = "510-814-2012";
     $address = "190b Mississippi St, Portland, OR 97221";
     $hours = "9am - ?";
     $test_cuisine_type_id = $test_cuisine_type->getId();
     $test_restaurant = new Restaurant($id, $name, $phone, $address, $hours, $test_cuisine_type_id);
     $test_restaurant->save();
     //Act
     $test_cuisine_type->delete();
     //Assert
     $this->assertEquals([], Restaurant::getAll());
 }
 function test_deleteCuisine()
 {
     //Arrange
     $type = "french";
     $id = null;
     $test_cuisine = new Cuisine($type, $id);
     $test_cuisine->save();
     $name = "Petit Provence";
     $phone = "555-555-5555";
     $price = "\$\$";
     $cuisine_id = $test_cuisine->getId();
     $test_restaurant = new Restaurant($id, $name, $phone, $price, $cuisine_id);
     $test_restaurant->save();
     //Act
     $test_cuisine->delete();
     //Assert
     $this->assertEquals([], Cuisine::getAll());
 }
Ejemplo n.º 14
0
 function test_deleteCuisineRestaurants()
 {
     //arrange
     $type = "Tacos";
     $id = null;
     $test_cuisine = new Cuisine($type, $id);
     $test_cuisine->save();
     $name = "Mercado";
     $cuisine_id = $test_cuisine->getId();
     $price_range = 3;
     $neighborhood = "Felony Flats";
     $test_restaurant = new Restaurant($name, $id, $cuisine_id, $price_range, $neighborhood);
     $test_restaurant->save();
     //act
     $test_cuisine->delete();
     //assert
     $this->assertEquals([], Restaurant::getAll());
 }