From 677b5edcdd879d50ddb698ccf92cfed41c55a50e Mon Sep 17 00:00:00 2001 From: andy wharmby Date: Wed, 17 Jun 2009 19:15:18 +0000 Subject: [PATCH] New test for standard object compare handler. Tested on Windows, Linux and Linux 64 --- tests/lang/compare_objects_basic1.phpt | 60 ++++++++++++++++++++++++++ tests/lang/compare_objects_basic2.phpt | 28 ++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 tests/lang/compare_objects_basic1.phpt create mode 100644 tests/lang/compare_objects_basic2.phpt diff --git a/tests/lang/compare_objects_basic1.phpt b/tests/lang/compare_objects_basic1.phpt new file mode 100644 index 0000000000..fe312fc59f --- /dev/null +++ b/tests/lang/compare_objects_basic1.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test standard 'compare' object handler +--FILE-- + + +===DONE=== +--EXPECT-- +Simple test for standard compare object handler + +-- The following compare should return TRUE -- +bool(true) + +-- All the following compares should return FALSE -- +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +===DONE=== \ No newline at end of file diff --git a/tests/lang/compare_objects_basic2.phpt b/tests/lang/compare_objects_basic2.phpt new file mode 100644 index 0000000000..a2c34d06ad --- /dev/null +++ b/tests/lang/compare_objects_basic2.phpt @@ -0,0 +1,28 @@ +--TEST-- +Test object compare when object handler different +--FILE-- + + +===DONE=== +--EXPECTF-- +Simple test comparing two objects with different compare callback handler + +Notice: Object of class X could not be converted to int in %s on line %d + +Notice: Object of class DateTime could not be converted to int in %s on line %d +bool(true) +===DONE=== \ No newline at end of file -- 2.50.1