1
0
Fork 0
mirror of synced 2025-04-20 01:21:01 +00:00

add factory test

This commit is contained in:
Sergey Chazov 2020-09-03 11:37:04 +03:00
parent ae34da0214
commit 58d9c0f1a7

View file

@ -0,0 +1,22 @@
<?php
namespace Tests\Intaro\RetailCrm\Component\Factory;
use Bitrix\Main\Config\Option;
use Intaro\RetailCrm\Component\ApiClient\ClientAdapter;
use Intaro\RetailCrm\Component\ConfigProvider;
use Intaro\RetailCrm\Component\Factory\ClientFactory;
use PHPUnit\Framework\TestCase;
class ClientFactoryTest extends TestCase
{
public function testCreacteClientAdapter(): void
{
$client = ClientFactory::creacteClientAdapter();
if (empty(ConfigProvider::getApiUrl())) {
self::assertEquals(null, $client);
}else{
self::assertEquals(ClientAdapter::class, get_class($client));
}
}
}