1
0
mirror of synced 2024-11-25 06:16:03 +03:00
aliexpress-top-client/tests/RetailCrm/Tests/Factory/TopClientFactoryTest.php

42 lines
940 B
PHP

<?php
/**
* PHP version 7.3
*
* @category TopClientFactoryTest
* @package RetailCrm\Tests\Factory
*/
namespace RetailCrm\Tests\Factory;
use RetailCrm\Component\AppData;
use RetailCrm\Component\Exception\ValidationException;
use RetailCrm\Factory\TopClientFactory;
use RetailCrm\Test\TestCase;
/**
* Class TopClientFactoryTest
*
* @category TopClientFactoryTest
* @package RetailCrm\Tests\Factory
*/
class TopClientFactoryTest extends TestCase
{
public function testCreateClient(): void
{
$client = TopClientFactory::createClient(
AppData::OVERSEAS_ENDPOINT,
'appKey',
'appSecret',
'token'
);
self::assertNotEmpty($client);
}
public function testCreateClientException(): void
{
$this->expectException(ValidationException::class);
TopClientFactory::createClient('https://example.com', 'appKey', 'appSecret');
}
}