コード例 #1
0
ファイル: CursorTest.php プロジェクト: d-ashesss/php-console
 public function testMove_up_left()
 {
     $this->cursor->move(-2, -2);
     $this->assertEquals("", $this->console->getOutput());
 }
コード例 #2
0
ファイル: Screen.php プロジェクト: d-ashesss/php-console
 /**
  * Clears entire screen and moves cursor to upper left corner
  */
 public function clear()
 {
     $this->console->writeCode(Code::SCREEN_CLEAR);
     $this->console->cursor()->moveTo(0, 0);
 }
コード例 #3
0
ファイル: Cursor.php プロジェクト: d-ashesss/php-console
 /**
  * Restores previously saved cursor position and attributes
  */
 public function restore()
 {
     $this->console->writeCode(Code::CURSOR_RESTORE);
 }
コード例 #4
0
ファイル: ConsoleTest.php プロジェクト: d-ashesss/php-console
 public function testWriteCode()
 {
     $this->console->writeCode('test');
     $this->assertEquals("test", $this->console->getOutput());
 }
コード例 #5
0
ファイル: ScreenTest.php プロジェクト: d-ashesss/php-console
 public function testScrollDown_5()
 {
     $this->screen->scrollDown(5);
     $this->assertEquals("MMMMM", $this->console->getOutput());
 }