Release 2.0.31 (#4245)
* replace strings by class references * allow 64 chars for username * fix time can be optional and null * fix timezone is not respected * bump version * fix br in attribute * support different visible duration from booked duration * fix image URL
This commit is contained in:
34
tests/WorkingTime/Model/DayAddonTest.php
Normal file
34
tests/WorkingTime/Model/DayAddonTest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\WorkingTime\Model;
|
||||
|
||||
use App\WorkingTime\Model\DayAddon;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\WorkingTime\Model\DayAddon
|
||||
*/
|
||||
class DayAddonTest extends TestCase
|
||||
{
|
||||
public function testDefaults(): void
|
||||
{
|
||||
$sut = new DayAddon('foo-bar', 7200, 0);
|
||||
self::assertEquals('foo-bar', $sut->getTitle());
|
||||
self::assertEquals(7200, $sut->getDuration());
|
||||
self::assertEquals(0, $sut->getVisibleDuration());
|
||||
self::assertTrue($sut->isBillable());
|
||||
|
||||
$sut->setBillable(false);
|
||||
self::assertFalse($sut->isBillable());
|
||||
|
||||
$sut->setBillable(true);
|
||||
self::assertTrue($sut->isBillable());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user