Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assignPosition example
class
ReaderTest
extends
TestCase
{
public
function
testIsEOF
(
)
{
$reader
=
new
Reader
(
''
)
;
$this
->
assertTrue
(
$reader
->
isEOF
(
)
)
;
$reader
=
new
Reader
(
'hello'
)
;
$this
->
assertFalse
(
$reader
->
isEOF
(
)
)
;
$this
->
assignPosition
(
$reader
, 2
)
;
$this
->
assertFalse
(
$reader
->
isEOF
(
)
)
;
$this
->
assignPosition
(
$reader
, 5
)
;
$this
->
assertTrue
(
$reader
->
isEOF
(
)
)
;
}
public
function
testGetRemainingLength
(
)
{
$reader
=
new
Reader
(
'hello'
)
;
$this
->
assertEquals
(
5,
$reader
->
getRemainingLength
(
)
)
;