mirror of https://github.com/nextcloud/server
Revert "Streamline reseting of private static properties"
This reverts commit e50121d4c0
.
This commit is contained in:
parent
e50121d4c0
commit
92e60caa86
|
@ -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,17 +224,17 @@ class UtilTest extends \Test\TestCase {
|
|||
parent::setUp();
|
||||
|
||||
\OC_Util::$scripts = [];
|
||||
\OCP\Util::clearScriptsState();
|
||||
\OC_Util::$styles = [];
|
||||
self::invokePrivate(\OCP\Util::class, 'scripts', [[]]);
|
||||
self::invokePrivate(\OCP\Util::class, 'scriptsDeps', [[]]);
|
||||
}
|
||||
protected function tearDown(): void {
|
||||
parent::tearDown();
|
||||
|
||||
\OC_Util::$scripts = [];
|
||||
\OCP\Util::clearScriptsState();
|
||||
\OC_Util::$styles = [];
|
||||
self::invokePrivate(\OCP\Util::class, 'scripts', [[]]);
|
||||
self::invokePrivate(\OCP\Util::class, 'scriptsDeps', [[]]);
|
||||
}
|
||||
|
||||
public function testAddScript() {
|
||||
|
|
Loading…
Reference in New Issue