Release 2.0.20 (#4028)
* max duration per entry increased from 8 to 10 hours * fixes #3981 - clickable area in dropdown too small * fixes #4008 - duplicate activities in project-details report * headers and summary styling in project-details report * show billable stats in project-details report * added new invoice variable for entry.duration_format
This commit is contained in:
@@ -288,7 +288,7 @@ class ConfigurationTest extends TestCase
|
||||
'allow_overbooking_budget' => true,
|
||||
'lockdown_period_timezone' => null,
|
||||
'break_warning_duration' => 0,
|
||||
'long_running_duration' => 480,
|
||||
'long_running_duration' => 600,
|
||||
'require_activity' => true,
|
||||
],
|
||||
'duration_increment' => 15,
|
||||
|
||||
@@ -53,6 +53,7 @@ class InvoiceItemDefaultHydratorTest extends TestCase
|
||||
'entry.total_plain',
|
||||
'entry.currency',
|
||||
'entry.duration',
|
||||
'entry.duration_format',
|
||||
'entry.duration_decimal',
|
||||
'entry.duration_minutes',
|
||||
'entry.begin',
|
||||
|
||||
@@ -260,6 +260,7 @@ class DebugRendererTest extends TestCase
|
||||
'entry.total_plain',
|
||||
'entry.currency',
|
||||
'entry.duration',
|
||||
'entry.duration_format',
|
||||
'entry.duration_decimal',
|
||||
'entry.duration_minutes',
|
||||
'entry.begin',
|
||||
|
||||
@@ -11,36 +11,51 @@ namespace App\Tests\Model\Statistic;
|
||||
|
||||
use App\Model\Statistic\Month;
|
||||
use App\Model\Statistic\Year;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Model\Statistic\Year
|
||||
*/
|
||||
class YearTest extends AbstractTimesheetTest
|
||||
class YearTest extends TestCase
|
||||
{
|
||||
public function testDefaultValues()
|
||||
public function testDefaultValues(): void
|
||||
{
|
||||
$sut = new Year('1999');
|
||||
$this->assertDefaultValues($sut);
|
||||
|
||||
self::assertNull($sut->getMonth(1));
|
||||
self::assertEmpty($sut->getMonths());
|
||||
self::assertIsArray($sut->getMonths());
|
||||
self::assertEquals('1999', $sut->getYear());
|
||||
self::assertSame(0, $sut->getBillableDuration());
|
||||
self::assertSame(0.0, $sut->getRate());
|
||||
self::assertSame(0.0, $sut->getBillableRate());
|
||||
self::assertSame(0, $sut->getDuration());
|
||||
self::assertSame(0, $sut->getBillableDuration());
|
||||
}
|
||||
|
||||
public function testSetter()
|
||||
public function testSetter(): void
|
||||
{
|
||||
$sut = new Year('1999');
|
||||
$this->assertSetter($sut);
|
||||
|
||||
$sut->setMonth(new Month('01'));
|
||||
$sut->setMonth(new Month('02'));
|
||||
$sut->setMonth(new Month('03'));
|
||||
$january = new Month('01');
|
||||
$january->setBillableDuration(1234);
|
||||
$january->setBillableRate(4321.12);
|
||||
$january->setTotalDuration(2345);
|
||||
$january->setTotalRate(5555.55);
|
||||
|
||||
$february = new Month('02');
|
||||
$february->setBillableDuration(1234);
|
||||
$february->setBillableRate(4321.12);
|
||||
|
||||
$march = new Month('03');
|
||||
$march->setBillableDuration(1);
|
||||
$march->setBillableRate(1.1);
|
||||
|
||||
$sut->setMonth($january);
|
||||
$sut->setMonth($february);
|
||||
$sut->setMonth($march);
|
||||
self::assertEquals(3, \count($sut->getMonths()));
|
||||
|
||||
$sut->setMonth(new Month('01'));
|
||||
$sut->setMonth(new Month('02'));
|
||||
|
||||
self::assertEquals(3, \count($sut->getMonths()));
|
||||
|
||||
@@ -49,9 +64,9 @@ class YearTest extends AbstractTimesheetTest
|
||||
self::assertInstanceOf(Month::class, $sut->getMonth(3));
|
||||
self::assertNull($sut->getMonth(4));
|
||||
|
||||
$sut->setBillableDuration(123456);
|
||||
$sut->setBillableRate(123.456789);
|
||||
self::assertSame(123456, $sut->getBillableDuration());
|
||||
self::assertSame(123.456789, $sut->getBillableRate());
|
||||
self::assertSame(1235, $sut->getBillableDuration());
|
||||
self::assertSame(2345, $sut->getDuration());
|
||||
self::assertSame(4322.22, $sut->getBillableRate());
|
||||
self::assertSame(5555.55, $sut->getRate());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7917,16 +7917,6 @@ parameters:
|
||||
count: 1
|
||||
path: Model/Statistic/TimesheetTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Model\\\\Statistic\\\\YearTest\\:\\:testDefaultValues\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Model/Statistic/YearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Model\\\\Statistic\\\\YearTest\\:\\:testSetter\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Model/Statistic/YearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Model\\\\TimesheetCountedStatisticTest\\:\\:testDefaultValues\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
|
||||
Reference in New Issue
Block a user