Differential D11419 Diff 27435 src/infrastructure/daemon/workers/clock/__tests__/PhabricatorTriggerClockTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/clock/__tests__/PhabricatorTriggerClockTestCase.php
Show All 15 Lines | $this->assertEqual( | ||||
pht('Should trigger at specified epoch.')); | pht('Should trigger at specified epoch.')); | ||||
$this->assertEqual( | $this->assertEqual( | ||||
null, | null, | ||||
$clock->getNextEventEpoch(1, false), | $clock->getNextEventEpoch(1, false), | ||||
pht('Should trigger only once.')); | pht('Should trigger only once.')); | ||||
} | } | ||||
public function testNeverTriggerClock() { | |||||
$clock = new PhabricatorNeverTriggerClock(array()); | |||||
$this->assertEqual( | |||||
null, | |||||
$clock->getNextEventEpoch(null, false), | |||||
pht('Should never trigger.')); | |||||
} | |||||
public function testSubscriptionTriggerClock() { | public function testSubscriptionTriggerClock() { | ||||
$start = strtotime('2014-01-31 2:34:56 UTC'); | $start = strtotime('2014-01-31 2:34:56 UTC'); | ||||
$clock = new PhabricatorSubscriptionTriggerClock( | $clock = new PhabricatorSubscriptionTriggerClock( | ||||
array( | array( | ||||
'start' => $start, | 'start' => $start, | ||||
)); | )); | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |