function test_updatePhone() { //Arrange $name = "Suzie Palloozi"; $phone = "1-800-439-0398"; $test_patron = new Patron($name, $phone); $test_patron->save(); $new_phone = "570-943-0483"; //Act $test_patron->updatePhone($new_phone); //Assert $result = Patron::getAll(); $this->assertEquals("570-943-0483", $result[0]->getPhone()); }
function test_updatePhone() { //Arrange $name = "Dan Brown"; $phone = "3"; $email = "*****@*****.**"; $test_patron = new Patron($name, $phone, $email); $test_patron->save(); //Act $new_phone = "888"; $test_patron->updatePhone($new_phone); //Assert $result = Patron::getAll(); $this->assertEquals($new_phone, $result[0]->getPhone()); }