aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/DB
diff options
context:
space:
mode:
authorAndrew Summers <18727110+summersab@users.noreply.github.com>2023-08-29 16:29:33 -0500
committerAndrew Summers <18727110+summersab@users.noreply.github.com>2023-08-29 21:32:40 -0500
commit1395a5360274a6c6c0b4084d22da53466998c954 (patch)
tree01f3f8d5b532b0ccff57b4f4a806f11d94e87ce6 /tests/lib/DB
parent9d1547f59d53b46ba401ddf0e7f4c6e4f067004e (diff)
downloadnextcloud-server-1395a5360274a6c6c0b4084d22da53466998c954.tar.gz
nextcloud-server-1395a5360274a6c6c0b4084d22da53466998c954.zip
Refactor `OC\Server::getSecureRandom`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
Diffstat (limited to 'tests/lib/DB')
-rw-r--r--tests/lib/DB/MigratorTest.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php
index 4d7d9cab19f..06bb005cc44 100644
--- a/tests/lib/DB/MigratorTest.php
+++ b/tests/lib/DB/MigratorTest.php
@@ -24,6 +24,7 @@ use OC\DB\PostgreSqlMigrator;
use OC\DB\SQLiteMigrator;
use OCP\DB\Types;
use OCP\IConfig;
+use OCP\Security\ISecureRandom;
/**
* Class MigratorTest
@@ -61,7 +62,7 @@ class MigratorTest extends \Test\TestCase {
private function getMigrator(): Migrator {
$platform = $this->connection->getDatabasePlatform();
- $random = \OC::$server->getSecureRandom();
+ $random = \OC::$server->get(ISecureRandom::class);
$dispatcher = \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class);
if ($platform instanceof SqlitePlatform) {
return new SQLiteMigrator($this->connection, $this->config, $dispatcher);