Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
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
)
)
;
}