diff --git a/tests/tojson_001.phpt b/tests/tojson_001.phpt new file mode 100644 index 0000000..f87474e --- /dev/null +++ b/tests/tojson_001.phpt @@ -0,0 +1,20 @@ +--TEST-- +Test V8::executeString() : redirects toJSON() to jsonSerialize +--SKIPIF-- + +--FILE-- +foo = new Foo; +$v8->executeString('var_dump(JSON.stringify(PHP.foo));'); +?> +===EOF=== +--EXPECTF-- +string(13) "["foo","bar"]" +===EOF=== \ No newline at end of file