File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ public function initialize()
5656 } elseif (isset ($ config ['className ' ])) {
5757 Cache::drop ($ name );
5858 $ instance = new DebugEngine ($ config , $ name , $ this ->logger );
59- Cache::setConfig ($ name , $ instance );
59+ $ config ['className ' ] = $ instance ;
60+ Cache::setConfig ($ name , $ config );
6061 }
6162 if (isset ($ instance )) {
6263 $ this ->instances [$ name ] = $ instance ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public function setUp(): void
3737 {
3838 parent ::setUp ();
3939 $ this ->panel = new CachePanel ();
40- Cache::setConfig ('debug_kit_test ' , ['className ' => 'Null ' ]);
40+ Cache::setConfig ('debug_kit_test ' , ['className ' => 'Null ' , ' path ' => TMP ]);
4141 }
4242
4343 /**
@@ -110,4 +110,11 @@ public function testInitializeTwiceNoDoubleProxy()
110110 $ result2 = Cache::engine ('debug_kit_test ' );
111111 $ this ->assertSame ($ result2 , $ result );
112112 }
113+
114+ public function testInitializePreserveGlobalConfig ()
115+ {
116+ $ this ->panel ->initialize ();
117+ $ result = Cache::getConfig ('debug_kit_test ' );
118+ $ this ->assertEquals ($ result ['path ' ], TMP );
119+ }
113120}
You can’t perform that action at this time.
0 commit comments