first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace Paynow\Tests;
use GuzzleHttp\Psr7\Response;
use Http\Mock\Client;
use Paynow\HttpClient\HttpClient;
class TestHttpClient extends HttpClient
{
public function mockResponse($responseFile, $httpStatus)
{
$this->client = new Client();
$content = null;
if (null != $responseFile) {
$filePath = dirname(__FILE__).'/resources/'.$responseFile;
$content = file_get_contents($filePath, true);
}
$response = new Response($httpStatus, ['Content-Type' => 'application/json'], $content);
$this->client->addResponse($response);
}
}