mirror of
https://github.com/TheAlgorithms/PHP.git
synced 2025-07-09 11:13:50 +02:00
20 lines
486 B
PHP
20 lines
486 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
|
require_once __DIR__ . '/../../Ciphers/VignereCipher.php';
|
|
|
|
class VignereCipherTest extends TestCase
|
|
{
|
|
public function testVignereCipher()
|
|
{
|
|
$plaintext = "HELLO";
|
|
$key = "KEY";
|
|
$encryptedText = vigenere_encrypt($plaintext, $key);
|
|
$decryptedText = vigenere_decrypt($encryptedText, $key);
|
|
|
|
$this->assertEquals($plaintext, $decryptedText);
|
|
}
|
|
}
|