diff options
author | Andrew Summers <18727110+summersab@users.noreply.github.com> | 2023-08-29 16:29:33 -0500 |
---|---|---|
committer | Andrew Summers <18727110+summersab@users.noreply.github.com> | 2023-08-29 21:32:40 -0500 |
commit | 1395a5360274a6c6c0b4084d22da53466998c954 (patch) | |
tree | 01f3f8d5b532b0ccff57b4f4a806f11d94e87ce6 /tests/lib/DB | |
parent | 9d1547f59d53b46ba401ddf0e7f4c6e4f067004e (diff) | |
download | nextcloud-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.php | 3 |
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); |