tests erweitert
This commit is contained in:
parent
2640b70e5e
commit
46689d085e
|
@ -41,8 +41,25 @@ class test extends TestCase {
|
||||||
$this->assertEquals($data, $numberBaseCryptCollection->getPlainData());
|
$this->assertEquals($data, $numberBaseCryptCollection->getPlainData());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Full Circle simple data collection test
|
// Full Circle simple data collection test with a single element
|
||||||
public function testFullCircleDataCollectionComplex() {
|
public function testFullCircleDataCollectionComplexSingle() {
|
||||||
|
$data = [1337];
|
||||||
|
$numberBaseCryptCollection = new \NAE\Crypt\NumberBaseCryptCollection([
|
||||||
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||||
|
'a', 'b', 'c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
|
||||||
|
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'
|
||||||
|
]);
|
||||||
|
foreach($data as $value) {
|
||||||
|
$numberBaseCryptCollection->addData($value);
|
||||||
|
}
|
||||||
|
$dataCollection = $numberBaseCryptCollection->render();
|
||||||
|
$digits = $numberBaseCryptCollection->getDigitList();
|
||||||
|
$reverse = $numberBaseCryptCollection->decryptComplex($dataCollection, $digits);
|
||||||
|
$this->assertEquals($data, $reverse);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Full Circle simple data collection test with multiple elements
|
||||||
|
public function testFullCircleDataCollectionComplexMulti() {
|
||||||
$data = [1337,1338,11111,141415,12,5];
|
$data = [1337,1338,11111,141415,12,5];
|
||||||
$numberBaseCryptCollection = new \NAE\Crypt\NumberBaseCryptCollection([
|
$numberBaseCryptCollection = new \NAE\Crypt\NumberBaseCryptCollection([
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||||
|
|
Loading…
Reference in New Issue