Drop redundant crypto gateway tests

This commit is contained in:
2026-03-19 20:17:11 +01:00
parent 72c7f1b337
commit 011d662dfc
2 changed files with 0 additions and 66 deletions

View File

@@ -1,34 +0,0 @@
<?php
namespace MintyPHP\Tests\Service\Auth;
use MintyPHP\Service\Auth\AuthCryptoGateway;
use PHPUnit\Framework\TestCase;
final class AuthCryptoGatewayTest extends TestCase
{
private AuthCryptoGateway $gateway;
protected function setUp(): void
{
if (!defined('APP_CRYPTO_KEY')) {
define('APP_CRYPTO_KEY', str_repeat('ab', 32));
}
$this->gateway = new AuthCryptoGateway();
}
public function testIsConfiguredReturnsTrueWhenKeyIsSet(): void
{
self::assertTrue($this->gateway->isConfigured());
}
public function testEncryptDecryptDelegatesToCrypto(): void
{
$plaintext = 'auth-secret';
$encrypted = $this->gateway->encryptString($plaintext);
self::assertNotSame($plaintext, $encrypted);
self::assertSame($plaintext, $this->gateway->decryptString($encrypted));
}
}

View File

@@ -1,32 +0,0 @@
<?php
namespace MintyPHP\Tests\Service\Settings;
use MintyPHP\Service\Settings\SettingsCryptoGateway;
use MintyPHP\Service\Settings\SettingsCryptoGatewayInterface;
use PHPUnit\Framework\TestCase;
final class SettingsCryptoGatewayTest extends TestCase
{
protected function setUp(): void
{
if (!defined('APP_CRYPTO_KEY')) {
define('APP_CRYPTO_KEY', str_repeat('ab', 32));
}
}
public function testImplementsSettingsCryptoGatewayInterface(): void
{
self::assertInstanceOf(SettingsCryptoGatewayInterface::class, new SettingsCryptoGateway());
}
public function testEncryptDecryptDelegatesToCrypto(): void
{
$gateway = new SettingsCryptoGateway();
$plaintext = 'settings-secret';
$encrypted = $gateway->encryptString($plaintext);
self::assertNotSame($plaintext, $encrypted);
self::assertSame($plaintext, $gateway->decryptString($encrypted));
}
}