function test_findByAuthorBookId() { //Arrange $book_name = "Gattica"; $book_id = 2; $test_book = new Book($book_name, $book_id); $test_book->save(); $author_name = "Aristole"; $author_id2 = 1; $test_author = new Author($author_name, $author_id2); $test_author->save(); $book_name = "Battlestar"; $book_id = 2; $test_book2 = new Book($book_name, $book_id); $test_book2->save(); $author_name = "Plato"; $author_id2 = 1; $test_author2 = new Author($author_name, $author_id2); $test_author2->save(); $author_id = $test_author->getId(); $book_id = $test_book->getId(); $due_date = "2015-08-29"; $id = 3; $checkout_patron_id = 1; $test_book_list = new BookList($author_id, $book_id, $due_date, $checkout_patron_id, $id); $test_book_list->save(); $author_id2 = $test_author2->getId(); $book_id2 = $test_book2->getId(); $due_date2 = "2015-08-27"; $id2 = 4; $checkout_patron_id2 = 2; $test_book_list2 = new BookList($author_id2, $book_id2, $due_date2, $checkout_patron_id2, $id2); $test_book_list2->save(); $due_date3 = "2015-08-27"; $id3 = 5; $checkout_patron_id3 = 3; $test_book_list3 = new BookList($author_id, $book_id, $due_date3, $checkout_patron_id3, $id3); $test_book_list3->save(); //Act $search_id1 = $test_book_list->getAuthorId(); $search_id2 = $test_book_list->getBookId(); $result = BookList::findBookList($search_id1, $search_id2); //Assert $this->assertEquals([$test_book_list, $test_book_list3], $result); }