function testUpdate() { //Arrange $due_date = '2015-10-10'; $book_id = 1; $id = 1; $test_copy = new Copy($due_date, $book_id, $id); $test_copy->save(); $new_due_date = '2015-11-11'; //Act $test_copy->update($new_due_date); //Assert $this->assertEquals('2015-11-11', $test_copy->getDueDate()); }
function testUpdateDueDate() { //Arrange $book_id = 1; $due_date = "2015-12-12"; $test_copy = new Copy($book_id, $due_date); $test_copy->save(); $new_due_date = "2012-21-21"; //Act $test_copy->updateDueDate($new_due_date); //Assert $this->assertEquals($test_copy->getDueDate(), $new_due_date); }