From 2312555b5d0a12e01bc8e228d0c582c9610e9218 Mon Sep 17 00:00:00 2001 From: Ken Guest Date: Thu, 12 Oct 2017 20:59:43 +0100 Subject: [PATCH 1/4] SoapParam should emit a warning if the parameter name is an empty string. --- ext/soap/tests/param001.phpt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ext/soap/tests/param001.phpt diff --git a/ext/soap/tests/param001.phpt b/ext/soap/tests/param001.phpt new file mode 100644 index 0000000000..498838abd2 --- /dev/null +++ b/ext/soap/tests/param001.phpt @@ -0,0 +1,21 @@ +--TEST-- +SoapParam should emit a warning if the parameter name is an empty string +--SKIPIF-- + +--FILE-- + +--CREDITS-- +PHP TestFest 2017 - PHPDublin - Ken Guest +--EXPECTF-- +Warning: SoapParam::SoapParam(): Invalid parameter name in %s on line %d +object(SoapParam)#%d (%d) { + ["param_name"]=> + string(4) "Name" + ["param_data"]=> + int(1) +} From a673cddb285a97e689de82f6653f892aab16a263 Mon Sep 17 00:00:00 2001 From: Ken Guest Date: Sat, 21 Oct 2017 20:57:42 +0100 Subject: [PATCH 2/4] PHP TestFest 2017 - phpdublin - soapheader tests. --- ext/soap/tests/header001.phpt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ext/soap/tests/header001.phpt diff --git a/ext/soap/tests/header001.phpt b/ext/soap/tests/header001.phpt new file mode 100644 index 0000000000..9ba9961e11 --- /dev/null +++ b/ext/soap/tests/header001.phpt @@ -0,0 +1,33 @@ +--TEST-- +SoapHeader emits specific warnings depending on invalid parameters passed to constructor. +--SKIPIF-- + +--FILE-- + +--CREDITS-- +PHP TestFest 2017 - PHPDublin - Ken Guest +--EXPECTF-- +Warning: SoapHeader::SoapHeader(): Invalid namespace in %s on line %d + +Warning: SoapHeader::SoapHeader(): Invalid header name in %s on line %d + +Warning: SoapHeader::SoapHeader(): Invalid actor in %s on line %d + +Warning: SoapHeader::SoapHeader(): Invalid actor in %s on line %d + +Warning: SoapHeader::SoapHeader(): Invalid actor in %s on line %d From fd3b133c7704c97d6823b529e388a3ab9410ac21 Mon Sep 17 00:00:00 2001 From: Ken Guest Date: Sat, 21 Oct 2017 21:11:34 +0100 Subject: [PATCH 3/4] PHP TestFest 2017 - phpdublin - SoapVar should emit a warning if the type id is invalid (e.g. 'Invalid') --- ext/soap/tests/var001.phpt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ext/soap/tests/var001.phpt diff --git a/ext/soap/tests/var001.phpt b/ext/soap/tests/var001.phpt new file mode 100644 index 0000000000..149fd81d21 --- /dev/null +++ b/ext/soap/tests/var001.phpt @@ -0,0 +1,13 @@ +--TEST-- +SoapVar should emit a warning if the type id is invalid (e.g. "Invalid") +--SKIPIF-- + +--FILE-- + +--CREDITS-- +PHP TestFest 2017 - PHPDublin - Ken Guest +--EXPECTF-- +Warning: SoapVar::SoapVar(): Invalid type ID in %s on line %d From e23790f14a8292f0d7390174562204758376630a Mon Sep 17 00:00:00 2001 From: Ken Guest Date: Tue, 24 Oct 2017 00:38:53 +0100 Subject: [PATCH 4/4] Bug #75421Invalid values accepted for the SoapHeader actor parameter. --- ext/soap/tests/bugs/bug75421.phpt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ext/soap/tests/bugs/bug75421.phpt diff --git a/ext/soap/tests/bugs/bug75421.phpt b/ext/soap/tests/bugs/bug75421.phpt new file mode 100644 index 0000000000..34b8552f40 --- /dev/null +++ b/ext/soap/tests/bugs/bug75421.phpt @@ -0,0 +1,25 @@ +--TEST-- +SoapHeader allows an invalid URL as the actor string, 'invalid actor' warning should be raised. +--SKIPIF-- + +--FILE-- + +--CREDITS-- +PHP TestFest 2017 - PHPDublin - Ken Guest +--EXPECTF-- +bool(false) +Warning: SoapHeader::SoapHeader(): Invalid actor in %s on line %d