本文整理汇总了PHP中Checkout::getDueDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::getDueDate方法的具体用法?PHP Checkout::getDueDate怎么用?PHP Checkout::getDueDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::getDueDate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Checkout
function test_getDueDate()
{
//Arrange
$due_date = "0001-01-01";
$test_checkout = new Checkout($due_date);
//Act
$result = $test_checkout->getDueDate();
//Assert
$this->assertEquals($due_date, $result);
}
示例2: testGetDueDate
function testGetDueDate()
{
$due_date = "2015-09-10";
$copy_id = 1;
$patron_id = 1;
$checkin_status = 1;
$test_checkout = new Checkout($due_date, $copy_id, $patron_id, $checkin_status);
$result = $test_checkout->getDueDate();
$this->assertEquals($due_date, $result);
}
示例3: testUpdate
function testUpdate()
{
//Arrange
$id = null;
$patron_id = null;
$copy_id = null;
$due_date = "2012-12-12";
$test_checkout = new Checkout($id, $patron_id, $copy_id, $due_date);
$test_checkout->save();
$new_due_date = "2013-03-05";
//Act
$test_checkout->update($new_due_date);
//Assert
$result = $test_checkout->getDueDate();
$this->assertEquals($new_due_date, $result);
}
示例4: Patron
function test_updateDueDate()
{
//Arrange
// Make a Patron
$name = "Dan Brown";
$phone = "3";
$email = "a@a.com";
$test_patron = new Patron($name, $phone, $email);
$test_patron->save();
// Make a Checkout and save
$patron_id = $test_patron->getId();
$copy_id = 1;
$due_date = "2015-08-09";
$test_checkout = new Checkout($patron_id, $copy_id, $due_date);
$test_checkout->save();
$new_due_date = "2015-08-27";
//Act
$test_checkout->updateDueDate($new_due_date);
//Assert
$result = $test_checkout->getDueDate();
$this->assertEquals($new_due_date, $result);
}
示例5: Checkout
function test_update()
{
//Arrange
$checked_in_status = 0;
$due_date = "2000 BC";
$copy_id = 4;
$patron_id = 4;
$test_checkout = new Checkout($checked_in_status, $due_date, $copy_id, $patron_id);
$test_checkout->save();
$checked_in_status2 = 1;
$due_date2 = "2015-27-08";
$copy_id2 = 5;
$patron_id2 = 5;
$test_checkout2 = new Checkout($checked_in_status2, $due_date2, $copy_id2, $patron_id2);
$test_checkout2->save();
//Act
$test_checkout->update($checked_in_status2, $due_date2);
//Assert
$this->assertEquals($test_checkout2->getDueDate(), $test_checkout->getDueDate());
}