32 lines
760 B
PHP
32 lines
760 B
PHP
<?php
|
|
|
|
namespace Tests\Service;
|
|
|
|
use App\Service\Dbal\BitrixService;
|
|
use PHPUnit\Framework\TestCase;
|
|
use Doctrine\DBAL\Connection;
|
|
use Doctrine\ORM\EntityManagerInterface;
|
|
|
|
class BitrixServiceTest extends TestCase
|
|
{
|
|
private BitrixService $service;
|
|
|
|
protected function setUp(): void
|
|
{
|
|
$databaseUrl = $_ENV['DATABASE_BITRIX_URL'];
|
|
|
|
$this->service = new BitrixService($databaseUrl);
|
|
}
|
|
|
|
public function testConnect(): void
|
|
{
|
|
|
|
$connection = $this->service->getConnection();
|
|
|
|
// $this->assertEquals($plaintext, $decrypted);
|
|
|
|
// Проверяем, что подключение установлено
|
|
$this->assertInstanceOf(Connection::class, $connection);
|
|
}
|
|
}
|