function test_updateName() { //Arrange $name = "Suzie Palloozi"; $phone = "1-800-439-0398"; $test_patron = new Patron($name, $phone); $test_patron->save(); // $column_to_update = "name"; $new_name = "Suzie Q"; //Act $test_patron->updateName($new_name); //Assert $result = Patron::getAll(); $this->assertEquals("Suzie Q", $result[0]->getName()); }
function test_updateName() { //Arrange $name = "Dan Brown"; $phone = "3"; $email = "*****@*****.**"; $test_patron = new Patron($name, $phone, $email); $test_patron->save(); //Act $new_name = "Billy Worthington"; $test_patron->updateName($new_name); //Assert $result = Patron::getAll(); $this->assertEquals($new_name, $result[0]->getName()); }