Added timesheet-calendar view (#236)
This commit is contained in:
40
tests/Calendar/ConfigTest.php
Normal file
40
tests/Calendar/ConfigTest.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?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\Calendar;
|
||||
|
||||
use App\Calendar\Config;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass \App\Calendar\Config
|
||||
*/
|
||||
class ConfigTest extends TestCase
|
||||
{
|
||||
public function testConstruct()
|
||||
{
|
||||
$config = [
|
||||
'businessHours' => [
|
||||
'days' => [0, 99, 127],
|
||||
'begin' => '07:49',
|
||||
'end' => '19:27'
|
||||
],
|
||||
'day_limit' => 20,
|
||||
'week_numbers' => false,
|
||||
];
|
||||
|
||||
$sut = new Config($config);
|
||||
|
||||
$this->assertEquals([0, 99, 127], $sut->getBusinessDays());
|
||||
$this->assertEquals('07:49', $sut->getBusinessTimeBegin());
|
||||
$this->assertEquals('19:27', $sut->getBusinessTimeEnd());
|
||||
$this->assertEquals(20, $sut->getDayLimit());
|
||||
$this->assertFalse($sut->isShowWeekNumbers());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user