feat(payment): add payment detail endpoint and update payment model with order_id and patient_name
feat(appointment): enhance appointment detail page with time formatting and additional info fix(payment): update payment query to fetch from the correct endpoint and adjust response structure docs(api): add search parameter to payments API documentation and detail response structure test(payment): add unit test for MellatGateway to verify null credentials handling
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user