Release 2.39 (#5604)
* prepare audit via annotation * default calendar slot label distance of 1h + replace freestyle config with dropdown * added missing return definition in callbacks * refactor view name handling * dispatch calendar view changes and push them into the URL to be able to reload the poage * bump packages * fix timezone issue in calendar sum calculation * fixes #5618 resetRates() * show expected daily hours in working-contract screen
This commit is contained in:
34
tests/Audit/VersionedTest.php
Normal file
34
tests/Audit/VersionedTest.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\Audit;
|
||||
|
||||
use App\Audit\Versioned;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use Symfony\Component\Form\Test\TypeTestCase;
|
||||
|
||||
#[CoversClass(Versioned::class)]
|
||||
class VersionedTest extends TypeTestCase
|
||||
{
|
||||
public function testConstruct(): void
|
||||
{
|
||||
$sut = new Versioned();
|
||||
self::assertInstanceOf(Versioned::class, $sut);
|
||||
}
|
||||
|
||||
public function testHasAttributeAttributeOnLoggable(): void
|
||||
{
|
||||
$reflection = new \ReflectionClass(Versioned::class);
|
||||
/** @var array<\ReflectionAttribute<\Attribute>> $attributes */
|
||||
$attributes = array_filter($reflection->getAttributes(), fn ($attr) => $attr->getName() === \Attribute::class);
|
||||
self::assertCount(1, $attributes, 'Versioned class should have the Attribute attribute');
|
||||
$attribute = $attributes[0];
|
||||
self::assertEquals(\Attribute::TARGET_PROPERTY, $attribute->getArguments()[0]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user