Skip to content
Snippets Groups Projects
Commit 737a0af7 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

fix branch tests : tests on lateissues were broken

parent 986bcf68
Branches
Tags
No related merge requests found
Pipeline #15135 failed with stage
in 17 minutes and 27 seconds
......@@ -20,6 +20,8 @@
*/
class Class_WebService_SIGB_Emprunt extends Class_WebService_SIGB_ExemplaireOperation {
use Trait_TimeSource;
protected $enRetard;
protected $_returned = false;
protected $renewable = true;
......@@ -103,7 +105,7 @@ class Class_WebService_SIGB_Emprunt extends Class_WebService_SIGB_ExemplaireOper
if (!isset($this->enRetard)) {
$this->enRetard = (!$this->_returned)
&&
($this->getDateRetourTimestamp() <= strtotime('Yesterday'));
($this->getDateRetourTimestamp() <= $this->getCurrentTime());
}
return $this->enRetard;
......
......@@ -79,6 +79,7 @@ class PretsTestWithConnectedUser extends ViewHelperTestCase {
$this->_time_source = new TimeSourceForTest('2015-09-30 16:51:09');
Class_WebService_BibNumerique_Dilicom_Hub::setTimeSource($this->_time_source);
Class_WebService_SIGB_Emprunt::setTimeSource($this->_time_source);
Class_Loan_Pnb::setTimeSource($this->_time_source);
......@@ -90,6 +91,7 @@ class PretsTestWithConnectedUser extends ViewHelperTestCase {
public function tearDown() {
Class_WebService_BibNumerique_Dilicom_Hub::setDefaultHttpClient(null);
Class_WebService_BibNumerique_Dilicom_Hub::setTimeSource(null);
Class_WebService_SIGB_Emprunt::setTimeSource(null);
Class_Loan_Pnb::setTimeSource(null);
parent::tearDown();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment