chore: initial import for test contour

This commit is contained in:
sova-bootstrap
2026-05-27 19:36:32 +03:00
commit 166cdb148e
282 changed files with 84872 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace Tests\Service;
use App\Service\Crypt\AESCryptService;
use PHPUnit\Framework\TestCase;
class AESCryptServiceTest extends TestCase
{
private AESCryptService $service;
protected function setUp(): void
{
$secret = $_ENV['AES_SECRET_KEY'];
$cipher = $_ENV['AES_CIPHER_METHOD'];
$this->service = new AESCryptService($secret, $cipher);
}
public function testEncryptDecrypt(): void
{
$plaintext = 'Hello, world!';
$encrypted = $this->service->encrypt($plaintext);
$decrypted = $this->service->decrypt($encrypted);
$this->assertNotEquals($plaintext, $encrypted);
$this->assertEquals($plaintext, $decrypted);
}
}