Kraken\_Unit\Util\Buffer\BufferTest::testApiRemove_RemovesAndReturnsValidData_WhenOffsetIsPassed PHP Method

testApiRemove_RemovesAndReturnsValidData_WhenOffsetIsPassed() public method

    public function testApiRemove_RemovesAndReturnsValidData_WhenOffsetIsPassed()
    {
        $length = 10;
        $offset = 5;
        $result = $this->buffer->remove($length, $offset);
        $this->assertSame(substr($this->initialString, $offset, $length), $result);
        $this->assertSame(substr($this->initialString, 0, $offset) . substr($this->initialString, $offset + $length), (string) $this->buffer);
    }