Release 2.0.28 (#4172)

See https://github.com/kimai/kimai/pull/4172
This commit is contained in:
Kevin Papst
2023-07-09 15:27:27 +02:00
committed by GitHub
parent 651f812da8
commit 385753fbc3
27 changed files with 182 additions and 53 deletions

View File

@@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase;
*/
class ConfigureMainMenuEventTest extends TestCase
{
public function testGetterAndSetter()
public function testGetterAndSetter(): void
{
$sut = new ConfigureMainMenuEvent();

View File

@@ -24,8 +24,9 @@ class WorkingTimeYearEventTest extends TestCase
$user = new User();
$date = new \DateTime('2023-02-10');
$year = new Year($date, $user);
$sut = new WorkingTimeYearEvent($year);
$sut = new WorkingTimeYearEvent($year, clone $date);
self::assertSame($year, $sut->getYear());
self::assertEquals('2023-02-10', $sut->getUntil()->format('Y-m-d'));
}
}

View File

@@ -22,12 +22,15 @@ class MonthTest extends TestCase
{
public function testDefaults(): void
{
$user = new User();
$user->setUsername('foo-bar');
$months = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
foreach($months as $key => $days) {
$index = ++$key;
$monthKey = ($index < 10) ? '0' . $index : $index;
$date = new \DateTimeImmutable(sprintf('2020-%s-25 13:00:00', $monthKey));
$month = new Month($date);
$month = new Month($date, $user);
self::assertEquals(sprintf('2020-%s-25', $monthKey), $month->getMonth()->format('Y-m-d'));
self::assertCount($days, $month->getDays());
self::assertFalse($month->isLocked());

View File

@@ -4982,11 +4982,6 @@ parameters:
count: 1
path: Event/CalendarGoogleSourceEventTest.php
-
message: "#^Method App\\\\Tests\\\\Event\\\\ConfigureMainMenuEventTest\\:\\:testGetterAndSetter\\(\\) has no return type specified\\.$#"
count: 1
path: Event/ConfigureMainMenuEventTest.php
-
message: "#^Method App\\\\Tests\\\\Event\\\\CustomerMetaDefinitionEventTest\\:\\:testGetterAndSetter\\(\\) has no return type specified\\.$#"
count: 1