2020-09-25 18:06:41 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2020-09-29 15:18:03 +03:00
|
|
|
* PHP version 7.3
|
2020-09-25 18:06:41 +03:00
|
|
|
*
|
2020-09-29 15:18:03 +03:00
|
|
|
* @category ClientTest
|
|
|
|
* @package RetailCrm\Tests\TopClient
|
2020-09-25 18:06:41 +03:00
|
|
|
* @author RetailCRM <integration@retailcrm.ru>
|
|
|
|
* @license MIT
|
|
|
|
* @link http://retailcrm.ru
|
|
|
|
* @see http://help.retailcrm.ru
|
|
|
|
*/
|
2020-09-29 15:18:03 +03:00
|
|
|
namespace RetailCrm\Tests\TopClient;
|
2020-09-25 18:06:41 +03:00
|
|
|
|
2020-09-29 15:18:03 +03:00
|
|
|
use RetailCrm\Builder\ClientBuilder;
|
2020-09-28 17:18:21 +03:00
|
|
|
use RetailCrm\Component\AppData;
|
2020-09-28 16:08:55 +03:00
|
|
|
use RetailCrm\Component\Authenticator\TokenAuthenticator;
|
2020-09-29 15:18:03 +03:00
|
|
|
use RetailCrm\Model\Request\HttpDnsGetRequest;
|
2020-09-28 17:18:21 +03:00
|
|
|
use RetailCrm\Test\TestCase;
|
2020-09-25 18:06:41 +03:00
|
|
|
|
|
|
|
/**
|
2020-09-29 15:18:03 +03:00
|
|
|
* Class ClientTest
|
2020-09-25 18:06:41 +03:00
|
|
|
*
|
2020-09-29 15:18:03 +03:00
|
|
|
* @category ClientTest
|
|
|
|
* @package RetailCrm\Tests\TopClient
|
2020-09-25 18:06:41 +03:00
|
|
|
* @author RetailDriver LLC <integration@retailcrm.ru>
|
|
|
|
* @license MIT
|
|
|
|
* @link http://retailcrm.ru
|
|
|
|
* @see https://help.retailcrm.ru
|
|
|
|
*/
|
2020-09-29 15:18:03 +03:00
|
|
|
class ClientTest extends TestCase
|
2020-09-25 18:06:41 +03:00
|
|
|
{
|
2020-09-29 15:18:03 +03:00
|
|
|
public function testClientRequest()
|
2020-09-25 18:06:41 +03:00
|
|
|
{
|
2020-09-29 15:18:03 +03:00
|
|
|
self::markTestSkipped('Not implemented yet');
|
2020-09-29 15:19:44 +03:00
|
|
|
|
2020-09-29 14:18:53 +03:00
|
|
|
$client = ClientBuilder::create()
|
|
|
|
->setContainer($this->getContainer())
|
2020-09-29 15:18:03 +03:00
|
|
|
->setAppData(new AppData(AppData::OVERSEAS_ENDPOINT, 'appKey', 'appSecret'))
|
2020-09-28 16:08:55 +03:00
|
|
|
->setAuthenticator(new TokenAuthenticator('appKey', 'token'))
|
2020-09-29 14:18:53 +03:00
|
|
|
->build();
|
2020-09-25 18:06:41 +03:00
|
|
|
|
2020-09-29 15:18:03 +03:00
|
|
|
$client->sendRequest(new HttpDnsGetRequest());
|
2020-09-25 18:06:41 +03:00
|
|
|
}
|
|
|
|
}
|