Пример #1
0
 function test_getReviews()
 {
     $unisex = 0;
     $key_required = 0;
     $public = 0;
     $handicap = 0;
     $changing_table = 0;
     $marker_id = 2;
     $test_bathroom = new Bathroom($unisex, $key_required, $public, $handicap, $changing_table, $marker_id);
     $test_bathroom->save();
     $rating = 1;
     $comment = "This place sucks!";
     $test_review = new Review($rating, $comment);
     $test_review->save();
     $rating2 = 3;
     $comment2 = "Its aight!";
     $test_review2 = new Review($rating2, $comment2);
     $test_review2->save();
     $test_bathroom->addReview($test_review->getId());
     $test_bathroom->addReview($test_review2->getId());
     $result = $test_bathroom->getReviews();
     $this->assertEquals([$test_review, $test_review2], $result);
 }