moveDown example

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

        $cursor->moveUp(12);

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

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

        $cursor->moveDown();

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

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

        $cursor->moveDown(12);

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