validation for future and negative times (#512)
This commit is contained in:
@@ -160,6 +160,14 @@ class ExtensionsTest extends TestCase
|
||||
// test fallback format
|
||||
$sut = $this->getSut($this->localeEn, 'XX');
|
||||
$this->assertEquals('02:37 h', $sut->duration($record->getDuration()));
|
||||
|
||||
// test negative duratiobn
|
||||
$sut = $this->getSut($this->localeEn, 'XX');
|
||||
$this->assertEquals('?', $sut->duration('-1'));
|
||||
|
||||
// test zero duration
|
||||
$sut = $this->getSut($this->localeEn, 'XX');
|
||||
$this->assertEquals('00:00 h', $sut->duration('0'));
|
||||
}
|
||||
|
||||
protected function getTimesheet($seconds)
|
||||
|
||||
Reference in New Issue
Block a user