示例#1
0
 function test_update()
 {
     $name = "Sally";
     $phone = "555-555-5555";
     $id = null;
     $test_stylist = new Stylist($name, $phone, $id);
     $test_stylist->save();
     $new_name = "Stella";
     $new_phone = "503-222-4445";
     $test_stylist->update($new_name, $new_phone);
     $this->assertEquals("Stella", $test_stylist->getName());
     $this->assertEquals("503-222-4445", $test_stylist->getPhone());
 }
示例#2
0
 function test_getPhone()
 {
     //Arrange
     $name = "Steph";
     $phone = "5033145678";
     $specialty = "Color";
     $weekends = true;
     $test_stylist = new Stylist($name, $phone, $specialty, $weekends);
     //Act
     $result = $test_stylist->getPhone();
     //Assert
     $this->assertEquals($phone, $result);
 }