File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 2626use Cake \TestSuite \TestCase ;
2727use DebugKit \Model \Entity \Request as RequestEntity ;
2828use DebugKit \Panel \SqlLogPanel ;
29+ use DebugKit \TestApp \Panel \SimplePanel ;
2930use DebugKit \ToolbarService ;
3031use PHPUnit \Framework \Attributes \DataProvider ;
3132
@@ -528,9 +529,10 @@ public function testSaveDataSerializationError()
528529 $ bar ->loadPanels ();
529530
530531 // Create a panel with unserializable data
531- $ panel = $ bar ->registry ()->load ('DebugKit.TestApp\Panel\SimplePanel ' );
532+ /** @var SimplePanel $panel */
533+ $ panel = $ bar ->registry ()->load (SimplePanel::class);
532534 // Mock the data() method to return something problematic
533- $ panel ->_data = ['closure ' => fn () => 'test ' ];
535+ $ panel ->setData ( ['closure ' => fn () => 'test ' ]) ;
534536
535537 $ row = $ bar ->saveData ($ request , $ response );
536538 $ this ->assertNotEmpty ($ row , 'Should save data even with serialization errors ' );
Original file line number Diff line number Diff line change 7171]);
7272
7373Cache::setConfig ([
74- '_cake_core_ ' => [
74+ '_cake_translations_ ' => [
7575 'engine ' => 'File ' ,
76- 'prefix ' => 'cake_core_ ' ,
76+ 'prefix ' => 'cake_translations_ ' ,
7777 'serialize ' => true ,
7878 ],
7979 '_cake_model_ ' => [
Original file line number Diff line number Diff line change 2222 */
2323class SimplePanel extends DebugPanel
2424{
25+ public function setData (array $ data ): void
26+ {
27+ $ this ->_data = $ data ;
28+ }
2529}
You can’t perform that action at this time.
0 commit comments