Beispiel #1
0
 function testGetCopy()
 {
     //Arrange
     $copy_id = 1;
     $test_copy = new Copy($copy_id);
     $test_copy->save();
     $copy_id2 = 2;
     $id2 = 2;
     $test_copy2 = new Copy($copy_id2);
     $test_copy2->save();
     $name = "Ping Pong";
     $id2 = 1;
     $test_patron = new Patron($name);
     $test_patron->save();
     //Act
     $test_patron->addCopy($test_copy->getId());
     $test_patron->addCopy($test_copy2->getId());
     //Assert
     $this->assertEquals($test_patron->getCopy(), [$test_copy, $test_copy2]);
 }