From 613947afc62633f8ebcec5b9649fd846a7a83e88 Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Mon, 23 Jul 2007 12:34:09 +0000 Subject: [PATCH] Tests which verify that you really cannot clone any of the mysqli objects. Technically it might be possible to tweak ext/mysqli and make the objects cloneable - tough, we haven't checked in depth. So, if one is interested, raise a discussion. --- .../tests/mysqli_driver_unclonable.phpt | 13 +++++++ .../tests/mysqli_result_unclonable.phpt | 21 +++++++++++ ext/mysqli/tests/mysqli_stmt_unclonable.phpt | 22 ++++++++++++ ext/mysqli/tests/mysqli_unclonable.phpt | 20 +++++++++++ .../tests/mysqli_warning_unclonable.phpt | 36 +++++++++++++++++++ 5 files changed, 112 insertions(+) create mode 100644 ext/mysqli/tests/mysqli_driver_unclonable.phpt create mode 100644 ext/mysqli/tests/mysqli_result_unclonable.phpt create mode 100644 ext/mysqli/tests/mysqli_stmt_unclonable.phpt create mode 100644 ext/mysqli/tests/mysqli_unclonable.phpt create mode 100644 ext/mysqli/tests/mysqli_warning_unclonable.phpt diff --git a/ext/mysqli/tests/mysqli_driver_unclonable.phpt b/ext/mysqli/tests/mysqli_driver_unclonable.phpt new file mode 100644 index 0000000000..0e2438eef9 --- /dev/null +++ b/ext/mysqli/tests/mysqli_driver_unclonable.phpt @@ -0,0 +1,13 @@ +--TEST-- +Trying to clone mysqli_driver object +--SKIPIF-- + + +--FILE-- + +--EXPECTF-- +Fatal error: Trying to clone an uncloneable object of class mysqli_driver in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_result_unclonable.phpt b/ext/mysqli/tests/mysqli_result_unclonable.phpt new file mode 100644 index 0000000000..9820c785e6 --- /dev/null +++ b/ext/mysqli/tests/mysqli_result_unclonable.phpt @@ -0,0 +1,21 @@ +--TEST-- +Trying to clone mysqli_result object +--SKIPIF-- + + +--FILE-- + +--EXPECTF-- +Fatal error: Trying to clone an uncloneable object of class mysqli_result in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt new file mode 100644 index 0000000000..13c3da7674 --- /dev/null +++ b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt @@ -0,0 +1,22 @@ +--TEST-- +Trying to clone mysqli_stmt object +--SKIPIF-- + + +--FILE-- + +--EXPECTF-- +Fatal error: Trying to clone an uncloneable object of class mysqli_stmt in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_unclonable.phpt b/ext/mysqli/tests/mysqli_unclonable.phpt new file mode 100644 index 0000000000..f7992d71e9 --- /dev/null +++ b/ext/mysqli/tests/mysqli_unclonable.phpt @@ -0,0 +1,20 @@ +--TEST-- +Trying to clone mysqli object +--SKIPIF-- + + +--FILE-- + +--EXPECTF-- +Fatal error: Trying to clone an uncloneable object of class mysqli in %s on line %d \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_warning_unclonable.phpt b/ext/mysqli/tests/mysqli_warning_unclonable.phpt new file mode 100644 index 0000000000..9a41c75fef --- /dev/null +++ b/ext/mysqli/tests/mysqli_warning_unclonable.phpt @@ -0,0 +1,36 @@ +--TEST-- +Trying to clone mysqli_warning object +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Fatal error: Trying to clone an uncloneable object of class mysqli_warning in %s on line %d \ No newline at end of file -- 2.40.0