<?php

namespace App\Tests\Payment;

use App\Config\Repository\SiteConfigRepository;
use App\Payment\Gateway\MellatGateway;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

class MellatGatewayTest extends TestCase
{
  public function testConstructorAcceptsNullCredentials(): void
  {
    $httpClient = $this->createMock(HttpClientInterface::class);
    $configRepo = $this->createMock(SiteConfigRepository::class);
    $logger = $this->createMock(LoggerInterface::class);

    $configRepo->method('get')->willReturn(null);

    $gateway = new MellatGateway($httpClient, $configRepo, $logger, null, null, null);

    $this->assertFalse($gateway->isConfigured());
  }
}
