You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
30
vendor/swoole/tests/swoole_serialize/001.phpt
vendored
Executable file
30
vendor/swoole/tests/swoole_serialize/001.phpt
vendored
Executable file
@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
swoole_serialize: Check for null serialisation
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require __DIR__ . '/../include/skipif.inc';
|
||||
if (!class_exists("swoole_serialize", false))
|
||||
{
|
||||
echo "skip";
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once __DIR__ . '/../include/bootstrap.php';
|
||||
|
||||
class Obj {
|
||||
var $a;
|
||||
var $b;
|
||||
|
||||
function __construct($a, $b) {
|
||||
$this->a = $a;
|
||||
$this->b = $b;
|
||||
}
|
||||
};
|
||||
$f = new Obj(1,2);
|
||||
$unserialized = swoole_serialize::pack($f);
|
||||
file_put_contents("/tmp/swoole_seria_test", $unserialized);
|
||||
echo "OK"
|
||||
?>
|
||||
--EXPECT--
|
||||
OK
|
Reference in New Issue
Block a user