88namespace mako \tests \unit \cli \output \components ;
99
1010use mako \cli \output \components \Hyperlink ;
11+ use mako \cli \output \components \hyperlink \Theme ;
1112use mako \cli \output \Output ;
1213use mako \tests \TestCase ;
1314use Mockery ;
@@ -35,7 +36,7 @@ public function testRenderWithHyperlinkSupport(): void
3536
3637 $ output = Mockery::mock (Output::class);
3738
38- $ hyperlink = Mockery::mock (Hyperlink::class, [$ output ]);
39+ $ hyperlink = Mockery::mock (Hyperlink::class, [$ output, new Theme ]);
3940
4041 $ hyperlink ->makePartial ();
4142
@@ -47,9 +48,9 @@ public function testRenderWithHyperlinkSupport(): void
4748
4849 $ link2 = $ hyperlink ->render ($ url , 'Example ' );
4950
50- $ this ->assertSame ("\x1b]8;id= {$ hash }; {$ url }\x1b\\{$ url }\x1b]8;; \x1b\\" , $ link1 );
51+ $ this ->assertSame ("\x1b]8;id= {$ hash }; {$ url }\x1b\\{$ url } [↗] \x1b]8;; \x1b\\" , $ link1 );
5152
52- $ this ->assertSame ("\x1b]8;id= {$ hash }; {$ url }\x1b\\Example \x1b]8;; \x1b\\" , $ link2 );
53+ $ this ->assertSame ("\x1b]8;id= {$ hash }; {$ url }\x1b\\Example [↗] \x1b]8;; \x1b\\" , $ link2 );
5354 }
5455
5556 /**
@@ -87,9 +88,9 @@ public function testDrawWithHyperlinkSupport(): void
8788
8889 $ output = Mockery::mock (Output::class);
8990
90- $ output ->shouldReceive ('write ' )->once ()->with ("\x1b]8;id= {$ hash }; {$ url }\x1b\\{$ url }\x1b]8;; \x1b\\" , 1 );
91+ $ output ->shouldReceive ('write ' )->once ()->with ("\x1b]8;id= {$ hash }; {$ url }\x1b\\{$ url } [↗] \x1b]8;; \x1b\\" , Output:: STANDARD );
9192
92- $ output ->shouldReceive ('write ' )->once ()->with ("\x1b]8;id= {$ hash }; {$ url }\x1b\\Example \x1b]8;; \x1b\\" , 1 );
93+ $ output ->shouldReceive ('write ' )->once ()->with ("\x1b]8;id= {$ hash }; {$ url }\x1b\\Example [↗] \x1b]8;; \x1b\\" , Output:: STANDARD );
9394
9495 $ hyperlink = Mockery::mock (Hyperlink::class, [$ output ]);
9596
@@ -113,9 +114,9 @@ public function testDrawWithoutHyperlinkSupport(): void
113114
114115 $ output = Mockery::mock (Output::class);
115116
116- $ output ->shouldReceive ('write ' )->once ()->with ($ url , 1 );
117+ $ output ->shouldReceive ('write ' )->once ()->with ($ url , Output:: STANDARD );
117118
118- $ output ->shouldReceive ('write ' )->once ()->with ("Example ( {$ url }) " , 1 );
119+ $ output ->shouldReceive ('write ' )->once ()->with ("Example ( {$ url }) " , Output:: STANDARD );
119120
120121 $ hyperlink = Mockery::mock (Hyperlink::class, [$ output ]);
121122
0 commit comments