File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ public function initialize(): void
5353 */
5454 public function summary (): string
5555 {
56+ if (!isset ($ this ->_data ['plugins ' ])) {
57+ return '0 ' ;
58+ }
59+
5660 return (string )count ($ this ->_data ['plugins ' ]);
5761 }
5862}
Original file line number Diff line number Diff line change @@ -121,10 +121,10 @@ public function testInvokeSaveData()
121121 $ this ->assertSame (200 , $ result ->status_code );
122122 $ this ->assertGreaterThan (1 , $ result ->panels );
123123
124- $ this ->assertSame ('SqlLog ' , $ result ->panels [11 ]->panel );
125- $ this ->assertSame ('DebugKit.sql_log_panel ' , $ result ->panels [11 ]->element );
126- $ this ->assertNotNull ($ result ->panels [11 ]->summary );
127- $ this ->assertSame ('Sql Log ' , $ result ->panels [11 ]->title );
124+ $ this ->assertSame ('SqlLog ' , $ result ->panels [12 ]->panel );
125+ $ this ->assertSame ('DebugKit.sql_log_panel ' , $ result ->panels [12 ]->element );
126+ $ this ->assertNotNull ($ result ->panels [12 ]->summary );
127+ $ this ->assertSame ('Sql Log ' , $ result ->panels [12 ]->title );
128128
129129 $ timeStamp = filectime (Plugin::path ('DebugKit ' ) . 'webroot ' . DS . 'js ' . DS . 'main.js ' );
130130
Original file line number Diff line number Diff line change @@ -250,10 +250,10 @@ public function testSaveData()
250250 $ this ->assertSame (200 , $ result ->status_code );
251251 $ this ->assertGreaterThan (1 , $ result ->panels );
252252
253- $ this ->assertSame ('SqlLog ' , $ result ->panels [11 ]->panel );
254- $ this ->assertSame ('DebugKit.sql_log_panel ' , $ result ->panels [11 ]->element );
255- $ this ->assertSame ('0 ' , $ result ->panels [11 ]->summary );
256- $ this ->assertSame ('Sql Log ' , $ result ->panels [11 ]->title );
253+ $ this ->assertSame ('SqlLog ' , $ result ->panels [12 ]->panel );
254+ $ this ->assertSame ('DebugKit.sql_log_panel ' , $ result ->panels [12 ]->element );
255+ $ this ->assertSame ('0 ' , $ result ->panels [12 ]->summary );
256+ $ this ->assertSame ('Sql Log ' , $ result ->panels [12 ]->title );
257257 }
258258
259259 /**
You can’t perform that action at this time.
0 commit comments