From b01add793c6757d4546f4a4f3f4f9d25b58fc561 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 14 Nov 2002 12:20:36 +0000 Subject: [PATCH] Add this test to make sure that fopencookie is detected and working correctly (or that the less efficient tmpfile casting is working). More details in the test itself. --- ext/standard/tests/file/fopencookie.phpt | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ext/standard/tests/file/fopencookie.phpt diff --git a/ext/standard/tests/file/fopencookie.phpt b/ext/standard/tests/file/fopencookie.phpt new file mode 100644 index 0000000000..7fc9dd79e9 --- /dev/null +++ b/ext/standard/tests/file/fopencookie.phpt @@ -0,0 +1,50 @@ +--TEST-- +fopencookie detected and working (or cast mechanism works) +--FILE-- +data, $this->position, $count); + $this->position += strlen($ret); + return $ret; + } + + function stream_tell() + { + return $this->position; + } + + function stream_eof() + { + return $this->position >= strlen($this->data); + } +} + +stream_register_wrapper("cookietest", "userstream"); + +include("cookietest://foo"); + +?> +--EXPECT-- +If you can read this, it worked -- 2.40.0