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

testApiPeek_TreatsOffsetAsZero_WhenNegativeOffsetIsPassed() public method

    public function testApiPeek_TreatsOffsetAsZero_WhenNegativeOffsetIsPassed()
    {
        $length = 10;
        $offset = -1;
        $result = $this->buffer->peek($length, $offset);
        $this->assertSame(substr($this->initialString, 0, $length), $result);
        $this->assertSame($this->initialString, (string) $this->buffer);
    }