0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-01-11 03:48:10 +00:00
kevinpapst_kimai2/tests/Event/UserPreferenceDisplayEventTest.php
2024-02-07 23:47:25 +01:00

33 lines
890 B
PHP

<?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\Event;
use App\Entity\UserPreference;
use App\Event\UserPreferenceDisplayEvent;
use PHPUnit\Framework\TestCase;
/**
* @covers \App\Event\UserPreferenceDisplayEvent
*/
class UserPreferenceDisplayEventTest extends TestCase
{
public function testGetterAndSetter(): void
{
$sut = new UserPreferenceDisplayEvent('blub');
self::assertEquals('blub', $sut->getLocation());
self::assertIsArray($sut->getPreferences());
self::assertEmpty($sut->getPreferences());
$preference = new UserPreference('foo', 'bar');
$sut->addPreference($preference);
self::assertEquals([$preference], $sut->getPreferences());
}
}