<?php

declare(strict_types=1);

/*
 * This file is part of the Ferienpass package.
 *
 * (c) Richard Henkenjohann <richard@ferienpass.online>
 *
 * For more information visit the project website <https://ferienpass.online>
 * or the documentation under <https://docs.ferienpass.online>.
 */

namespace Ferienpass\CmsBundle\Tests\UserAccount;

use Ferienpass\CmsBundle\UserAccount\UserAccountFragmentValueHolder;
use PHPUnit\Framework\TestCase;

final class UserAccountFragmentValueHolderTest extends TestCase
{
    public function testGettersReturnConstructorValues(): void
    {
        $holder = new UserAccountFragmentValueHolder('profile', 'profile-alias', 'user-icon', 'My Profile', 10, true);

        self::assertSame('profile', $holder->getKey());
        self::assertSame('profile-alias', $holder->getAlias());
        self::assertSame('user-icon', $holder->getIcon());
        self::assertSame('My Profile', $holder->getLabel());
        self::assertSame(10, $holder->getPriority());
        self::assertTrue($holder->isHideFromNavigation());
    }

    public function testDefaultValues(): void
    {
        $holder = new UserAccountFragmentValueHolder('key', 'alias', 'icon');

        self::assertNull($holder->getLabel());
        self::assertSame(0, $holder->getPriority());
        self::assertFalse($holder->isHideFromNavigation());
    }
}
