1
0
mirror of synced 2024-11-26 23:06:03 +03:00
aliexpress-top-client/tests/RetailCrm/Tests/Builder/ClientBuilderTest.php

36 lines
874 B
PHP
Raw Normal View History

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
use RetailCrm\Component\AppData;
use RetailCrm\Component\ServiceLocator;
use RetailCrm\Builder\TopClientBuilder;
use RetailCrm\Test\TestCase;
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()
{
$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
self::assertInstanceOf(TopClient::class, $client);
self::assertInstanceOf(ServiceLocator::class, $client->getServiceLocator());
2020-09-25 18:06:41 +03:00
}
}