本文整理汇总了PHP中Checkout::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::getId方法的具体用法?PHP Checkout::getId怎么用?PHP Checkout::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::getId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetId
function testGetId()
{
$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->getId();
$this->assertEquals(null, $result);
}
示例2: testGetId
function testGetId()
{
$id = 1;
$copy_id = 1;
$patron_id = 1;
$checkout_status = false;
$due_date = "2015-01-01";
$test_checkout = new Checkout($patron_id, $copy_id, $due_date, $checkout_status, $id);
$result = $test_checkout->getId();
$this->assertEquals(1, $result);
}
示例3: Checkout
function test_find()
{
//Arrange
$due_date = "0001-01-01";
$test_checkout = new Checkout($due_date);
$test_checkout->save();
$due_date2 = "2020-01-01";
$test_checkout2 = new Checkout($due_date2);
$test_checkout2->save();
//Act
$result = Checkout::find($test_checkout->getId());
//Assert
$this->assertEquals($test_checkout, $result);
}
示例4: testFind
function testFind()
{
//Arrange
$id = null;
$patron_id = 1;
$copy_id = 1;
$due_date = "2012-12-12";
$test_checkout = new Checkout($id, $patron_id, $copy_id, $due_date);
$test_checkout->save();
$patron_id2 = 1;
$copy_id2 = 1;
$due_date2 = "1989-09-04";
$test_checkout2 = new Checkout($id, $patron_id2, $copy_id2, $due_date2);
$test_checkout2->save();
//Act
$result = Checkout::find($test_checkout->getId());
//Assert
$this->assertEquals($test_checkout, $result);
}
示例5: Checkout
function test_updateDueDate()
{
//Arrange
$due_date = "0001-01-01";
$copy_id = 1;
$patron_id = 2;
$test_checkout = new Checkout($due_date, $copy_id, $patron_id);
$test_checkout->save();
$new_due_date = "2015-11-11";
$test_checkout->updateDueDate($new_due_date);
//Act
$id = $test_checkout->getId();
$result = new Checkout($new_due_date, $copy_id, $patron_id, $id);
//Assert
$this->assertEquals(Checkout::findDueDate($id), $result);
}
示例6: Checkout
function test_find()
{
//Arrange
$copy_id = 1;
$patron_id = 4;
$due_date = "2015-09-03";
$test_checkout = new Checkout($copy_id, $patron_id, $due_date);
$test_checkout->save();
$copy_id2 = 2;
$patron_id2 = 1;
$due_date2 = "2015-10-05";
$test_checkout2 = new Checkout($copy_id2, $patron_id2, $due_date2);
$test_checkout2->save();
//Act
$result = Checkout::find($test_checkout2->getId());
//Assert
$this->assertEquals($test_checkout2, $result);
}