mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Reset $scriptDeps in tests
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
6f62c17a95
commit
447cd553b6
2 changed files with 12 additions and 0 deletions
|
|
@ -597,4 +597,14 @@ class Util {
|
|||
}
|
||||
return $temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset scripts and scriptDeps to empty arrays.
|
||||
* Only used in tests.
|
||||
* @since 24.0.0
|
||||
*/
|
||||
public static function clearScriptsState() {
|
||||
self::$scripts = [];
|
||||
self::$scriptDeps = [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ class UtilTest extends \Test\TestCase {
|
|||
parent::setUp();
|
||||
|
||||
\OC_Util::$scripts = [];
|
||||
\OCP\Util::clearScriptsState();
|
||||
\OC_Util::$styles = [];
|
||||
self::invokePrivate(\OCP\Util::class, 'scripts', [[]]);
|
||||
}
|
||||
|
|
@ -231,6 +232,7 @@ class UtilTest extends \Test\TestCase {
|
|||
parent::tearDown();
|
||||
|
||||
\OC_Util::$scripts = [];
|
||||
\OCP\Util::clearScriptsState();
|
||||
\OC_Util::$styles = [];
|
||||
self::invokePrivate(\OCP\Util::class, 'scripts', [[]]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue