Beispiel #1
0
 function testSearchPatron()
 {
     //Arrange
     $patron_name = "Mr. Pickles";
     $id = null;
     $test_patron = new Patron($patron_name, $id);
     $test_patron->save();
     $patron_name2 = "John Doe";
     $test_patron2 = new Patron($patron_name2, $id);
     $test_patron2->save();
     $search_string = "Mr. Pickles";
     //Act
     $result = Patron::searchPatron($search_string);
     //Assert
     $this->assertEquals([$test_patron], $result);
 }