@@ -173,54 +173,6 @@ public function testWriteAfterReadlineInputWillClearReadlineWriteOutputAndRestor
173173 $ this ->assertEquals ("\r\033[K " . "test \n" . "> input " , $ buffer );
174174 }
175175
176- public function testOverwriteWillClearReadlineMoveToPreviousLineWriteOutputAndRestoreReadline ()
177- {
178- $ input = $ this ->getMockBuilder ('React\Stream\ReadableStreamInterface ' )->getMock ();
179- $ output = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )->getMock ();
180-
181- //$readline = $this->getMockBuilder('Clue\React\Stdio\Readline')->disableOriginalConstructor()->getMock();
182- $ readline = new Readline ($ input , $ output );
183- $ readline ->setPrompt ('> ' );
184- $ readline ->setInput ('input ' );
185-
186- $ stdio = new Stdio ($ this ->loop , $ input , $ output , $ readline );
187-
188- $ stdio ->write ('first ' );
189-
190- $ buffer = '' ;
191- $ output ->expects ($ this ->any ())->method ('write ' )->will ($ this ->returnCallback (function ($ data ) use (&$ buffer ) {
192- $ buffer .= $ data ;
193- }));
194-
195- $ stdio ->overwrite ('overwrite ' );
196-
197- $ this ->assertEquals ("\r\033[K " . "\033[A " . "\r\033[K " . "overwrite \n" . "> input " , $ buffer );
198- }
199-
200- public function testOverwriteAfterNewlineWillClearReadlineAndWriteOutputAndRestoreReadline ()
201- {
202- $ input = $ this ->getMockBuilder ('React\Stream\ReadableStreamInterface ' )->getMock ();
203- $ output = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )->getMock ();
204-
205- //$readline = $this->getMockBuilder('Clue\React\Stdio\Readline')->disableOriginalConstructor()->getMock();
206- $ readline = new Readline ($ input , $ output );
207- $ readline ->setPrompt ('> ' );
208- $ readline ->setInput ('input ' );
209-
210- $ stdio = new Stdio ($ this ->loop , $ input , $ output , $ readline );
211-
212- $ stdio ->write ("first \n" );
213-
214- $ buffer = '' ;
215- $ output ->expects ($ this ->any ())->method ('write ' )->will ($ this ->returnCallback (function ($ data ) use (&$ buffer ) {
216- $ buffer .= $ data ;
217- }));
218-
219- $ stdio ->overwrite ('overwrite ' );
220-
221- $ this ->assertEquals ("\r\033[K " . "overwrite \n" . "> input " , $ buffer );
222- }
223-
224176 public function testWriteLineWillClearReadlineWriteOutputAndRestoreReadline ()
225177 {
226178 $ input = $ this ->getMockBuilder ('React\Stream\ReadableStreamInterface ' )->getMock ();
0 commit comments