summaryrefslogtreecommitdiffstats
path: root/tests/lib/security/securerandom.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/security/securerandom.php')
-rw-r--r--tests/lib/security/securerandom.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/lib/security/securerandom.php b/tests/lib/security/securerandom.php
index d9bbd0e71e5..af437640805 100644
--- a/tests/lib/security/securerandom.php
+++ b/tests/lib/security/securerandom.php
@@ -57,11 +57,10 @@ class SecureRandomTest extends \Test\TestCase {
}
/**
- * @expectedException \Exception
- * @expectedExceptionMessage Generator is not initialized
+ * @dataProvider stringGenerationProvider
*/
- function testUninitializedGenerate() {
- $this->rng->generate(30);
+ function testUninitializedGenerate($length, $expectedLength) {
+ $this->assertEquals($expectedLength, strlen($this->rng->generate($length)));
}
/**