1
0
mirror of https://github.com/pmmp/ext-encoding.git synced 2024-11-23 13:36:25 +00:00
ext-encoding/tests/buffer-serialize-unserialize.phpt
Dylan K. Taylor 3d19cf75f5
Fix tests
2024-01-30 16:26:17 +00:00

31 lines
538 B
PHP

--TEST--
Test that ByteBuffer serializes and unserializes correctly
--FILE--
<?php
use pmmp\encoding\ByteBuffer;
$buffer = new ByteBuffer("hello world");
$buffer2 = unserialize(serialize($buffer));
var_dump($buffer, $buffer2);
?>
--EXPECTF--
object(pmmp\encoding\ByteBuffer)#%d (3) {
["buffer"]=>
string(11) "hello world"
["read_offset"]=>
int(0)
["write_offset"]=>
int(11)
}
object(pmmp\encoding\ByteBuffer)#%d (3) {
["buffer"]=>
string(11) "hello world"
["read_offset"]=>
int(0)
["write_offset"]=>
int(11)
}