Files
TheAlgorithms-PHP/tests/Ciphers/VignereCipherTest.php
Anamarija Papić aca121fff0 rename test case class.
- to fix "Test case not matching filename" deprecation warning
2023-10-07 08:33:44 +02:00

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);
}
}