1
0
mirror of synced 2024-11-25 23:06:07 +03:00
api-client-php/tests/RetailCrm/Tests/Http/RequestOptionsTest.php

26 lines
623 B
PHP
Raw Normal View History

2020-08-21 10:24:55 +03:00
<?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());
}
}