当前位置: 首页>>代码示例>>PHP>>正文


PHP Checkout::getId方法代码示例

本文整理汇总了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);
 }
开发者ID:umamiMike,项目名称:library-1,代码行数:10,代码来源:CheckoutTest.php

示例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);
 }
开发者ID:juliocesardiaz,项目名称:library-1,代码行数:11,代码来源:CheckoutTest.php

示例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);
 }
开发者ID:jlbethel,项目名称:Library,代码行数:14,代码来源:CheckoutTest.php

示例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);
 }
开发者ID:kellimargaret,项目名称:2015.08.26.Library,代码行数:19,代码来源:CheckoutTest.php

示例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);
 }
开发者ID:jlbethel,项目名称:library-1,代码行数:16,代码来源:CheckoutTest.php

示例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);
 }
开发者ID:r-hills,项目名称:library-1,代码行数:18,代码来源:CheckoutTest.php


注:本文中的Checkout::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。