本文整理汇总了PHP中Checkout::checkIn方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::checkIn方法的具体用法?PHP Checkout::checkIn怎么用?PHP Checkout::checkIn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::checkIn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetCurrentCheckouts
function testGetCurrentCheckouts()
{
$patron_name = "Randy Mclure";
$test_patron = new Patron($patron_name);
$test_patron->save();
$due_date = null;
$copy_id = 1;
$checkin_status = 1;
$test_checkout = new Checkout($due_date, $copy_id, $test_patron->getId(), $checkin_status);
$test_checkout->save($test_patron, $due_date);
$test_checkout->checkIn();
$due_date2 = null;
$copy_id2 = 2;
$checkin_status2 = 0;
$test_checkout2 = new Checkout($due_date2, $copy_id2, $test_patron->getId(), $checkin_status2);
$test_checkout2->save($test_patron);
$result = $test_patron->getCurrentCheckouts();
$this->assertEquals([$test_checkout2], $result);
}
示例2: testCheckIn
function testCheckIn()
{
$patron_name = "Randy Mclure";
$test_patron = new Patron($patron_name);
$test_patron->save();
$due_date = "2015-09-10";
$copy_id = 1;
$patron_id = 1;
$checkin_status = 1;
$test_checkout = new Checkout($due_date, $copy_id, $test_patron->getId(), $checkin_status);
$test_checkout->save($test_patron);
$test_checkout->checkIn();
$result = $test_checkout->getCheckinStatus();
$this->assertEquals(1, $result);
}