diff --git a/tests/aot/stream_method/extension.phpt b/tests/aot/stream_method/extension.phpt new file mode 100644 index 00000000..7a89ab7a --- /dev/null +++ b/tests/aot/stream_method/extension.phpt @@ -0,0 +1,51 @@ +--TEST-- +stream extension method support +--FILE-- +write("hello world"); + $fp->seek(0); + Assert::eq($fp->readChunk(5), "hello"); + $fp->close(); + + // Test 2: stream_count_lines extension → countLines() + $fp2 = fopen($tmpfile, 'w+'); + $fp2->write("line1\nline2\nline3"); + $fp2->seek(0); + Assert::eq($fp2->countLines(), 3); + $fp2->close(); + + unlink($tmpfile); + echo "OK\n"; +} +?> +--EXPECT-- +OK