PHP Class Kraken\_Unit\Util\Buffer\BufferTest

Inheritance: extends Kraken\Test\TUnit
Show file Open project: kraken-php/framework

Protected Properties

Property Type Description
$appendString string
$buffer Kraken\Util\Buffer\BufferInterface
$initialString string

Public Methods

Method Description
setUp ( )
testApiCount_ReturnsLengthOfData ( )
testApiDrain_EmptiesBuffer ( )
testApiInsert_InsertsDataAtProperPosition ( )
testApiIsEmpty_ReturnsFalseForNotEmptyBuffer ( )
testApiIsEmpty_ReturnsTrueForEmptyBuffer ( )
testApiLength_ReturnsLengthOfData ( )
testApiPeek_ReturnsEmptyString_WhenNegativeLengthIsPassed ( )
testApiPeek_ReturnsProperSubstring ( )
testApiPeek_ReturnsProperSubstring_WhenOffsetIsPassed ( )
testApiPeek_ReturnsWholeData_WhenLengthGreaterThanBufferLengthIsPassed ( )
testApiPeek_TreatsOffsetAsZero_WhenNegativeOffsetIsPassed ( )
testApiPop_ReturnsEmptyString_WhenInvalidLengthIsPassed ( )
testApiPop_ReturnsProperString ( )
testApiPush_AddsDataAtTheEnd ( )
testApiRemove_RemovesAndReturnsValidData ( )
testApiRemove_RemovesAndReturnsValidData_WhenInvalidOffsetIsPassed ( )
testApiRemove_RemovesAndReturnsValidData_WhenOffsetIsPassed ( )
testApiRemove_RemovesNothingAndReturnsEmptyString_WhenInvalidLengthIsPassed ( )
testApiReplace_ReplacesProperSubstring ( )
testApiSearch_FindsProperIndex ( )
testApiSearch_FindsProperIndex_WhenReverseIsPassed ( )
testApiShift_DoesNotChangeBufferState_WhenNegativeLengthIsPassed ( )
testApiShift_RemovesDataFromTheBeginning ( )
testApiUnshift_AddsDataAtTheBeginning ( )
testApi__toString_ReturnsWholeData ( )
testConstructor ( )
testGetInterator ( )
testOffsetExists ( )
testOffsetGet ( )
testOffsetSet ( )
testOffsetUnset ( )

Method Details

setUp() public method

public setUp ( )

testApiCount_ReturnsLengthOfData() public method

testApiDrain_EmptiesBuffer() public method

testApiInsert_InsertsDataAtProperPosition() public method

testApiIsEmpty_ReturnsFalseForNotEmptyBuffer() public method

testApiIsEmpty_ReturnsTrueForEmptyBuffer() public method

testApiLength_ReturnsLengthOfData() public method

testApiPeek_ReturnsEmptyString_WhenNegativeLengthIsPassed() public method

testApiPeek_ReturnsProperSubstring() public method

testApiPeek_ReturnsProperSubstring_WhenOffsetIsPassed() public method

testApiPeek_ReturnsWholeData_WhenLengthGreaterThanBufferLengthIsPassed() public method

testApiPeek_TreatsOffsetAsZero_WhenNegativeOffsetIsPassed() public method

testApiPop_ReturnsEmptyString_WhenInvalidLengthIsPassed() public method

testApiPop_ReturnsProperString() public method

testApiPush_AddsDataAtTheEnd() public method

testApiRemove_RemovesAndReturnsValidData() public method

testApiRemove_RemovesAndReturnsValidData_WhenInvalidOffsetIsPassed() public method

testApiRemove_RemovesAndReturnsValidData_WhenOffsetIsPassed() public method

testApiRemove_RemovesNothingAndReturnsEmptyString_WhenInvalidLengthIsPassed() public method

testApiReplace_ReplacesProperSubstring() public method

testApiSearch_FindsProperIndex() public method

testApiSearch_FindsProperIndex_WhenReverseIsPassed() public method

testApiShift_DoesNotChangeBufferState_WhenNegativeLengthIsPassed() public method

testApiShift_RemovesDataFromTheBeginning() public method

testApiUnshift_AddsDataAtTheBeginning() public method

testApi__toString_ReturnsWholeData() public method

testConstructor() public method

public testConstructor ( )

testGetInterator() public method

public testGetInterator ( )

testOffsetExists() public method

public testOffsetExists ( )

testOffsetGet() public method

public testOffsetGet ( )

testOffsetSet() public method

public testOffsetSet ( )

testOffsetUnset() public method

public testOffsetUnset ( )

Property Details

$appendString protected property

protected string $appendString
return string

$buffer protected property

protected BufferInterface,Kraken\Util\Buffer $buffer
return Kraken\Util\Buffer\BufferInterface

$initialString protected property

protected string $initialString
return string