File tree Expand file tree Collapse file tree 3 files changed +1
-30
lines changed Expand file tree Collapse file tree 3 files changed +1
-30
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,6 @@ public function clear() : void;
80
80
* Clear the current cursors line
81
81
*/
82
82
public function clearLine () : void ;
83
-
84
- /**
85
- * Erase the entire current line
86
- */
87
- public function clearEntireLine () : void ;
88
83
89
84
/**
90
85
* Erase screen from the current line down to the bottom of the screen
Original file line number Diff line number Diff line change @@ -192,14 +192,6 @@ public function clear() : void
192
192
}
193
193
194
194
public function clearLine () : void
195
- {
196
- $ this ->output ->write (sprintf ("\033[%dD \033[K " , $ this ->getWidth ()));
197
- }
198
-
199
- /**
200
- * Erase the entire current line
201
- */
202
- public function clearEntireLine () : void
203
195
{
204
196
$ this ->output ->write ("\033[2K " );
205
197
}
Original file line number Diff line number Diff line change @@ -145,24 +145,8 @@ public function testClearLine() : void
145
145
$ output = new BufferedOutput ;
146
146
147
147
$ 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
-
153
148
$ terminal ->clearLine ();
154
149
155
- self ::assertEquals ("\033[23D \033[K " , $ output ->fetch ());
156
- }
157
-
158
- public function testClearEntireLine () : void
159
- {
160
- $ input = $ this ->createMock (InputStream::class);
161
- $ output = new BufferedOutput ;
162
-
163
- $ terminal = new UnixTerminal ($ input , $ output );
164
- $ terminal ->clearEntireLine ();
165
-
166
150
self ::assertEquals ("\033[2K " , $ output ->fetch ());
167
151
}
168
152
@@ -193,7 +177,7 @@ public function testClean() : void
193
177
194
178
$ terminal ->clean ();
195
179
196
- 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 ());
197
181
}
198
182
199
183
public function testEnableCursor () : void
You can’t perform that action at this time.
0 commit comments