mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #6020 from kenjis/fix-BaseServices-reset
fix: change BaseService::reset() $initAutoloader to true by default
This commit is contained in:
commit
2f450dbfcc
@ -273,7 +273,7 @@ class BaseService
|
|||||||
/**
|
/**
|
||||||
* Reset shared instances and mocks for testing.
|
* Reset shared instances and mocks for testing.
|
||||||
*/
|
*/
|
||||||
public static function reset(bool $initAutoloader = false)
|
public static function reset(bool $initAutoloader = true)
|
||||||
{
|
{
|
||||||
static::$mocks = [];
|
static::$mocks = [];
|
||||||
static::$instances = [];
|
static::$instances = [];
|
||||||
|
@ -299,7 +299,7 @@ abstract class CIUnitTestCase extends TestCase
|
|||||||
/**
|
/**
|
||||||
* Resets shared instanced for all Services
|
* Resets shared instanced for all Services
|
||||||
*/
|
*/
|
||||||
protected function resetServices(bool $initAutoloader = false)
|
protected function resetServices(bool $initAutoloader = true)
|
||||||
{
|
{
|
||||||
Services::reset($initAutoloader);
|
Services::reset($initAutoloader);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user