<?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\CoreBundle\Tests\Payments;

use Ferienpass\CoreBundle\Entity\Payment;
use Ferienpass\CoreBundle\Payments\Provider\NoOpPaymentProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;

final class NoOpPaymentProviderTest extends TestCase
{
    public function testDispatchPaymentThrows(): void
    {
        $provider = new NoOpPaymentProvider();
        $payment = $this->createStub(Payment::class);

        $this->expectException(\BadMethodCallException::class);
        $provider->dispatchPayment($payment);
    }

    public function testInterpretRedirectThrows(): void
    {
        $provider = new NoOpPaymentProvider();

        $this->expectException(\BadMethodCallException::class);
        $provider->interpretRedirect(new Request());
    }

    public function testIsConfiguredReturnsFalse(): void
    {
        $provider = new NoOpPaymentProvider();
        self::assertFalse($provider->isConfigured());
    }
}
