From b59f4b245cc22692406a72c8a3ff2887f41f3687 Mon Sep 17 00:00:00 2001 From: andy wharmby Date: Wed, 19 Aug 2009 08:39:33 +0000 Subject: [PATCH] New basic test for md5(). Tested on Windows, Linux and Linux 64 bit --- ext/standard/tests/strings/md5_basic1.phpt | 17 +++++++++++ ext/standard/tests/strings/md5_basic2.phpt | 30 +++++++++++++++++++ ext/standard/tests/strings/md5_error.phpt | 35 ++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 ext/standard/tests/strings/md5_basic1.phpt create mode 100644 ext/standard/tests/strings/md5_basic2.phpt create mode 100644 ext/standard/tests/strings/md5_error.phpt diff --git a/ext/standard/tests/strings/md5_basic1.phpt b/ext/standard/tests/strings/md5_basic1.phpt new file mode 100644 index 0000000000..383de8eb98 --- /dev/null +++ b/ext/standard/tests/strings/md5_basic1.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test md5() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing md5() : basic functionality *** +unicode(32) "1f3870be274f6c49b3e31a0c6728957f" +===DONE=== diff --git a/ext/standard/tests/strings/md5_basic2.phpt b/ext/standard/tests/strings/md5_basic2.phpt new file mode 100644 index 0000000000..f161ae6b86 --- /dev/null +++ b/ext/standard/tests/strings/md5_basic2.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test md5() function : basic functionality - with raw output +--FILE-- + +===DONE=== +--EXPECT-- +*** Testing md5() : basic functionality - with raw output*** +unicode(32) "b10a8db164e0754105b7a99be72e3fe5" +TEST PASSED +===DONE=== \ No newline at end of file diff --git a/ext/standard/tests/strings/md5_error.phpt b/ext/standard/tests/strings/md5_error.phpt new file mode 100644 index 0000000000..190b09c8e5 --- /dev/null +++ b/ext/standard/tests/strings/md5_error.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test md5() function : error conditions +--FILE-- + +===DONE== +--EXPECTF-- +*** Testing md5() : error conditions *** + +-- Testing md5() function with no arguments -- + +Warning: md5() expects at least 1 parameter, 0 given in %s on line %d +NULL + +-- Testing md5() function with more than expected no. of arguments -- + +Warning: md5() expects at most 2 parameters, 3 given in %s on line %d +NULL +===DONE== \ No newline at end of file -- 2.40.0