1
0
mirror of synced 2024-12-01 00:56:04 +03:00
aliexpress-top-client/tests/RetailCrm/Tests/Factory/TopClientFactoryTest.php

42 lines
940 B
PHP
Raw Normal View History

<?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');
}
}