moveRight example

$cursor = new Cursor($output = $this->getOutputStream());

        $cursor->moveLeft(12);

        $this->assertEquals("\x1b[12D", $this->getOutputContent($output));
    }

    public function testMoveRightOneLine()
    {
        $cursor = new Cursor($output = $this->getOutputStream());

        $cursor->moveRight();

        $this->assertEquals("\x1b[1C", $this->getOutputContent($output));
    }

    public function testMoveRightMultipleLines()
    {
        $cursor = new Cursor($output = $this->getOutputStream());

        $cursor->moveRight(12);

        $this->assertEquals("\x1b[12C", $this->getOutputContent($output));
    }
Home | Imprint | This part of the site doesn't use cookies.