Skip to content

Commit 469eef4

Browse files
committed
feat: add reset() for testing
1 parent bfecd50 commit 469eef4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

system/Config/BaseConfig.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ public static function setModules(Modules $modules): void
8383
static::$moduleConfig = $modules;
8484
}
8585

86+
/**
87+
* @internal For testing purposes only.
88+
* @testTag
89+
*/
90+
public static function reset(): void
91+
{
92+
static::$registrars = [];
93+
static::$override = true;
94+
static::$didDiscovery = false;
95+
static::$moduleConfig = null;
96+
}
97+
8698
/**
8799
* Will attempt to get environment variables with names
88100
* that match the properties of the child class.

0 commit comments

Comments
 (0)