1
0
mirror of https://github.com/pmmp/ext-encoding.git synced 2024-11-23 13:36:25 +00:00
ext-encoding/tests/trim.phpt
Dylan K. Taylor 1314fffa01
Fixed test
2024-01-30 12:47:42 +00:00

23 lines
421 B
PHP

--TEST--
Test that ByteBuffer::trim() works correctly
--FILE--
<?php
use pmmp\encoding\ByteBuffer;
$buffer = new ByteBuffer("");
$buffer->reserve(100);
$buffer->writeByteArray("aaaaa");
var_dump($buffer->getReservedLength());
$buffer->trim();
var_dump($buffer->getReservedLength());
$buffer = new ByteBuffer("aaaaaaaaaa");
$buffer->trim();
var_dump($buffer->getReservedLength());
?>
--EXPECT--
int(100)
int(5)
int(10)