mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-12 10:18:39 +00:00
35 lines
850 B
PHP
35 lines
850 B
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.1
|
|
*
|
|
* @package TBD
|
|
* @author OMS Development Team <dev@oms.com>
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link http://website.orange-management.de
|
|
*/
|
|
|
|
namespace Tests\PHPUnit\phpOMS\Utils\Encoding;
|
|
|
|
require_once __DIR__ . '/../../Autoloader.php';
|
|
|
|
use phpOMS\Utils\Encoding\Caesar;
|
|
use phpOMS\Utils\RnG\StringUtils;
|
|
|
|
class CaesarTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
public function testVolume()
|
|
{
|
|
for($i = 0; $i < 100; $i++) {
|
|
$raw = StringUtils::generateString(1, 100);
|
|
$key = StringUtils::generateString(1, 100);
|
|
|
|
self::assertNotEquals($raw, Caesar::encode($raw, $key));
|
|
self::assertEquals($raw, Caesar::decode(Caesar::encode($raw, $key), $key));
|
|
}
|
|
}
|
|
}
|