@@ -145,14 +145,20 @@ public function testClearLine() : void
145145 $ output = new BufferedOutput ;
146146
147147 $ terminal = new UnixTerminal ($ input , $ output );
148- $ rf = new \ReflectionObject ($ terminal );
149- $ rp = $ rf ->getProperty ('width ' );
150- $ rp ->setAccessible (true );
151- $ rp ->setValue ($ terminal , 23 );
152-
153148 $ terminal ->clearLine ();
154149
155- self ::assertEquals ("\033[23D \033[K " , $ output ->fetch ());
150+ self ::assertEquals ("\033[2K " , $ output ->fetch ());
151+ }
152+
153+ public function testClearDown () : void
154+ {
155+ $ input = $ this ->createMock (InputStream::class);
156+ $ output = new BufferedOutput ;
157+
158+ $ terminal = new UnixTerminal ($ input , $ output );
159+ $ terminal ->clearDown ();
160+
161+ self ::assertEquals ("\033[J " , $ output ->fetch ());
156162 }
157163
158164 public function testClean () : void
@@ -171,7 +177,7 @@ public function testClean() : void
171177
172178 $ terminal ->clean ();
173179
174- self ::assertEquals ("\033[0;0H \033[23D \033[K \033 [ 1;0H \033[23D \033[K \033 [ 2;0H \033[23D \033 [K " , $ output ->fetch ());
180+ self ::assertEquals ("\033[0;0H \033[2K \033[1;0H \033[2K \033[2;0H \033[2K " , $ output ->fetch ());
175181 }
176182
177183 public function testEnableCursor () : void
0 commit comments