Skip to content
Snippets Groups Projects
Commit 9bf33361 authored by Jared Hancock's avatar Jared Hancock
Browse files

Add some regression tests for the random data

parent f6371942
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,15 @@ class TestCrypto extends Test {
$c->setKeys($this->master, 'simple');
$this->_testLibrary($c, $tests);
}
function testRandom() {
for ($i=1; $i<128; $i+=4) {
$data = Crypto::random($i);
$this->assertNotEqual($data, '', 'Empty random data generated');
$this->assert(strlen($data) == $i,
'Random data received was not the length requested');
}
}
}
return 'TestCrypto';
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment