2020-09-25 18:06:41 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PHP version 7.4
|
|
|
|
*
|
2020-09-29 14:18:53 +03:00
|
|
|
* @category ClientBuilderTest
|
|
|
|
* @package RetailCrm\Tests\Builder
|
2020-09-25 18:06:41 +03:00
|
|
|
*/
|
2020-09-29 14:18:53 +03:00
|
|
|
namespace RetailCrm\Tests\Builder;
|
2020-09-25 18:06:41 +03:00
|
|
|
|
2020-09-28 17:18:21 +03:00
|
|
|
use RetailCrm\Component\AppData;
|
2020-09-29 13:10:54 +03:00
|
|
|
use RetailCrm\Component\ServiceLocator;
|
2020-10-02 18:01:52 +03:00
|
|
|
use RetailCrm\Builder\TopClientBuilder;
|
2020-09-28 17:18:21 +03:00
|
|
|
use RetailCrm\Test\TestCase;
|
2020-10-02 18:01:52 +03:00
|
|
|
use RetailCrm\TopClient\TopClient;
|
2020-09-25 18:06:41 +03:00
|
|
|
|
|
|
|
/**
|
2020-09-29 14:18:53 +03:00
|
|
|
* Class ClientBuilderTest
|
2020-09-25 18:06:41 +03:00
|
|
|
*
|
2020-09-29 14:18:53 +03:00
|
|
|
* @category ClientBuilderTest
|
|
|
|
* @package RetailCrm\Tests\Builder
|
2020-09-25 18:06:41 +03:00
|
|
|
*/
|
2020-09-29 14:18:53 +03:00
|
|
|
class ClientBuilderTest extends TestCase
|
2020-09-25 18:06:41 +03:00
|
|
|
{
|
|
|
|
public function testCreateClient()
|
|
|
|
{
|
2020-10-02 18:01:52 +03:00
|
|
|
$client = TopClientBuilder::create()
|
2020-09-29 14:18:53 +03:00
|
|
|
->setContainer($this->getContainer())
|
|
|
|
->setAppData(new AppData(AppData::OVERSEAS_ENDPOINT, 'appKey', 'helloworld'))
|
|
|
|
->build();
|
2020-09-25 18:06:41 +03:00
|
|
|
|
2020-10-02 18:01:52 +03:00
|
|
|
self::assertInstanceOf(TopClient::class, $client);
|
2020-09-29 13:10:54 +03:00
|
|
|
self::assertInstanceOf(ServiceLocator::class, $client->getServiceLocator());
|
2020-09-25 18:06:41 +03:00
|
|
|
}
|
|
|
|
}
|