<?php

declare(strict_types=1);

namespace Ferienpass\AdminBundle\Tests\Event;

use Ferienpass\AdminBundle\Event\MenuEvent;
use Knp\Menu\FactoryInterface;
use Knp\Menu\ItemInterface;
use PHPUnit\Framework\TestCase;

final class MenuEventTest extends TestCase
{
    public function testGetOptionsReturnsConstructorOptions(): void
    {
        $factory = $this->createMock(FactoryInterface::class);
        $tree = $this->createMock(ItemInterface::class);

        $event = new MenuEvent($factory, $tree, ['foo' => 'bar', 'baz' => 42]);

        self::assertSame(['foo' => 'bar', 'baz' => 42], $event->getOptions());
    }

    public function testGetOptionsReturnsEmptyArrayWhenNoOptions(): void
    {
        $factory = $this->createMock(FactoryInterface::class);
        $tree = $this->createMock(ItemInterface::class);

        $event = new MenuEvent($factory, $tree, []);

        self::assertSame([], $event->getOptions());
    }
}
