mirror of
https://github.com/TheAlgorithms/PHP.git
synced 2025-01-17 07:08:13 +01:00
Add Mono-Alphabetic Cipher Test
Add Mono-Alphabetic Cipher Test
This commit is contained in:
parent
f9fbd54474
commit
4eee60024a
20
tests/MonoAlphabeticCipherTest.php
Normal file
20
tests/MonoAlphabeticCipherTest.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use function PHPUnit\Framework\assertEquals;
|
||||
|
||||
require_once __DIR__ . '/../app/monoAlphabeticCipher.php';
|
||||
|
||||
class MonoAlphabeticCipherTest extends TestCase
|
||||
{
|
||||
public function testLala(){
|
||||
$alphabet = "abcdefghijklmnopqrstuvwxyz";
|
||||
$key = "yhkqgvxfoluapwmtzecjdbsnri";
|
||||
$text = "I love1234 GitHub";
|
||||
$encryptedText = "O ambg XojFdh";
|
||||
|
||||
assertEquals(encrypt($key, $alphabet, $text), $encryptedText);
|
||||
assertEquals(decrypt($key, $alphabet, $encryptedText), "I love GitHub");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user