Remove all sleep statements in tests.

This commit is contained in:
Benoît Burnichon
2016-01-22 18:55:10 +01:00
parent fafabf3e9e
commit b4555a696a
4 changed files with 47 additions and 20 deletions

View File

@@ -99,16 +99,16 @@ class Bridge_Api
}
/**
*
* @return boolean
* @param null|DateTime $checkDate
* @return bool
*/
public function is_disabled()
public function is_disabled(DateTime $checkDate = null)
{
if ($this->disable_time === null) {
return false;
}
$date_obj = new DateTime();
$date_obj = $checkDate ?: new DateTime();
if ($date_obj > $this->disable_time) {
$this->enable();