Пример #1
0
 function test_addCheckout()
 {
     //Arrange
     $book_id = 4;
     $test_copy = new Copy($book_id);
     $test_copy->save();
     $name = "Phyllis the kind Grandma";
     $test_patron = new Patron($name);
     $test_patron->save();
     //Act
     $test_copy->addCheckout($test_patron);
     $result = $test_copy->getCheckout();
     //Assert
     $this->assertEquals($test_copy->getId(), $result->getCopyId());
 }