for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tests\Classes\Http;
use Ipag\Classes\Http\CurlOnlyPostHttpClient;
use PHPUnit\Framework\TestCase;
class CurlOnlyPostHttpClientTest extends TestCase
{
public function testCallInvokeShouldThrowException()
$this->expectException(\Exception::class);
$onlyPost = new CurlOnlyPostHttpClient();
$onlyPost('', [], []);
}
public function testCallInvokeSuccessfully()
$response = $onlyPost(\Ipag\Classes\Endpoint::SANDBOX, [
'Content-Type' => 'application/xml',
'Accept' => 'application/xml',
], [
'id' => 1,
'name' => 'teste',
]);
$this->assertNotEmpty($response);