@@ -233,60 +233,14 @@ public function testInvalidIconPathOption() : void
233233 $ this ->closeBuffer ();
234234 }
235235
236- public function testInfoLinkOption () : void
236+ public function testInfoContentsOption () : void
237237 {
238- $ this ->debugger ->setOption ('info_link ' , [
239- 'href ' => 'https://foo.com ' ,
240- 'text ' => 'Foo Website ' ,
241- ]);
242238 $ debugbar = $ this ->debugger ->renderDebugbar ();
243- self ::assertStringContainsString ('https://foo.com ' , $ debugbar );
244- self ::assertStringContainsString ('Foo Website ' , $ debugbar );
245- }
246-
247- public function testInvalidInfoLinkOption () : void
248- {
249- $ this ->debugger ->setOption ('info_link ' , []);
250- try {
251- $ this ->debugger ->renderDebugbar ();
252- } catch (\LogicException $ e ) {
253- self ::assertSame (
254- 'Info link must contain "href" and "text" keys ' ,
255- $ e ->getMessage ()
256- );
257- }
258- $ this ->closeBuffer ();
259- $ this ->debugger ->setOption ('info_link ' , [
260- 'href ' => '# ' ,
261- ]);
262- try {
263- $ this ->debugger ->renderDebugbar ();
264- } catch (\LogicException $ e ) {
265- self ::assertSame (
266- 'Info link must contain "href" and "text" keys ' ,
267- $ e ->getMessage ()
268- );
269- }
270- $ this ->closeBuffer ();
271- $ this ->debugger ->setOption ('info_link ' , [
272- 'text ' => '# ' ,
273- ]);
274- try {
275- $ this ->debugger ->renderDebugbar ();
276- } catch (\LogicException $ e ) {
277- self ::assertSame (
278- 'Info link must contain "href" and "text" keys ' ,
279- $ e ->getMessage ()
280- );
281- }
282- $ this ->closeBuffer ();
283- $ this ->debugger ->setOption ('info_link ' , [
284- 'href ' => 'https://foo.com ' ,
285- 'text ' => 'Foo Website ' ,
286- ]);
239+ self ::assertStringContainsString ('★ ' , $ debugbar );
240+ $ this ->debugger ->setOption ('info_contents ' , 'xxXxx ' );
287241 $ debugbar = $ this ->debugger ->renderDebugbar ();
288- self ::assertStringContainsString ('https://foo.com ' , $ debugbar );
289- self ::assertStringContainsString ( ' Foo Website ' , $ debugbar );
242+ self ::assertStringContainsString ('xxXxx ' , $ debugbar );
243+ self ::assertStringNotContainsString ( ' ★ ' , $ debugbar );
290244 }
291245
292246 public function testMakeSafeName () : void
0 commit comments