コード例 #1
0
 function test_getClients()
 {
     //Arrange
     $name = "Thai";
     $id = null;
     $test_stylist = new stylist($name, $id);
     $test_stylist->save();
     $test_stylist_id = $test_stylist->getId();
     $name = "Mai";
     $id = null;
     $description = "weird";
     $visits = 3;
     $name2 = "Doory";
     $id = null;
     $description2 = "Not worth it.";
     $visits2 = 4;
     $test_client = new Client($name, $test_stylist_id, $id, $visits, $description);
     $test_client2 = new Client($name2, $test_stylist_id, $id2, $visits2, $description2);
     $test_client->save();
     $test_client2->save();
     //Act
     $result = $test_stylist->getClients();
     //Assert
     $this->assertEquals([$test_client, $test_client2], $result);
 }