1
0
mirror of synced 2024-11-24 06:16:27 +03:00
api-client-php/tests/RetailCrm/Tests/Http/RequestOptionsTest.php
2020-08-21 10:24:55 +03:00

26 lines
623 B
PHP

<?php
namespace RetailCrm\Tests\Http;
use RetailCrm\Http\RequestOptions;
use RetailCrm\Test\TestCase;
class RequestOptionsTest extends TestCase
{
public function testGetHeaders()
{
$headers = ['X-Test-Header' => 'Test'];
$options = new RequestOptions($headers);
self::assertEquals('X-Test-Header: Test', $options->getHttpHeaders()[0]);
self::assertEquals('Test', $options->getHeaders()['X-Test-Header']);
}
public function testGetClientTimeout()
{
$options = new RequestOptions([], 10);
self::assertEquals(10, $options->getClientTimeout());
}
}