Drop redundant crypto gateway tests
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user