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


PHP Checkout::getPatronId方法代码示例

本文整理汇总了PHP中Checkout::getPatronId方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::getPatronId方法的具体用法?PHP Checkout::getPatronId怎么用?PHP Checkout::getPatronId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Checkout的用法示例。


在下文中一共展示了Checkout::getPatronId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testGetPatronId

 function testGetPatronId()
 {
     $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->getPatronId();
     $this->assertEquals($patron_id, $result);
 }
开发者ID:umamiMike,项目名称:library-1,代码行数:10,代码来源:CheckoutTest.php

示例2: testGetPatronId

 function testGetPatronId()
 {
     $patron_name = "Eduardo";
     $patron_id = 1;
     $test_patron = new Patron($patron_name, $patron_id);
     $test_patron->save();
     $copy_id = 1;
     $due_date = "2015-01-01";
     $checkout_status = false;
     $test_checkout = new Checkout($patron_id, $copy_id, $due_date, $checkout_status);
     $result = $test_checkout->getPatronId();
     $this->assertEquals(1, $result);
 }
开发者ID:juliocesardiaz,项目名称:library-1,代码行数:13,代码来源:CheckoutTest.php

示例3: Patron

 function test_getPatronId()
 {
     // for now, feed a dummy copy_id just for testing
     // later, we will need to use getNextCopy() in Book class
     // to get a copy for a given book
     //Arrange
     // Make a Patron
     $name = "Dan Brown";
     $phone = "3";
     $email = "a@a.com";
     $test_patron = new Patron($name, $phone, $email);
     // Make a Checkout
     $patron_id = $test_patron->getId();
     $copy_id = 1;
     $date = "2015-08-09";
     $test_checkout = new Checkout($patron_id, $copy_id, $date);
     //Act
     $result = $test_checkout->getPatronId();
     //Assert
     $this->assertEquals($patron_id, $result);
 }
开发者ID:ashlinaronin,项目名称:library,代码行数:21,代码来源:CheckoutTest.php

示例4: Patron

 function test_updatePatronId()
 {
     //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();
     //Make a second Patron
     $name2 = "Vaughn Brown";
     $phone2 = "4";
     $email2 = "vaughn.brown@jla.com";
     $test_patron2 = new Patron($name2, $phone2, $email2);
     $test_patron2->save();
     $new_patron_id = $test_patron2->getId();
     //Act
     $test_checkout->updatePatronId($new_patron_id);
     //Assert
     $result = $test_checkout->getPatronId();
     $this->assertEquals($new_patron_id, $result);
 }
开发者ID:r-hills,项目名称:Library,代码行数:28,代码来源:CheckoutTest.php


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