Files
kimai2/tests/EventSubscriber/MenuSubscriberTest.php
2025-08-11 18:57:42 +02:00

29 lines
856 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\EventSubscriber;
use App\Event\ConfigureMainMenuEvent;
use App\EventSubscriber\MenuSubscriber;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
#[CoversClass(MenuSubscriber::class)]
class MenuSubscriberTest extends TestCase
{
public function testGetSubscribedEvents(): void
{
$events = MenuSubscriber::getSubscribedEvents();
self::assertArrayHasKey(ConfigureMainMenuEvent::class, $events);
$methodName = $events[ConfigureMainMenuEvent::class][0];
self::assertIsString($methodName);
self::assertTrue(method_exists(MenuSubscriber::class, $methodName));
}
}