Пример #1
0
 function test_UpdatePriceRange()
 {
     //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();
     $new_price_range = 4;
     //act
     $test_restaurant->updatePriceRange($new_price_range);
     //assert
     $this->assertEquals(4, $test_restaurant->getPriceRange());
 }