From d3d7889f2a06091b32c8b5e317047478f3103082 Mon Sep 17 00:00:00 2001 From: Rodrigo Prado Date: Tue, 7 Nov 2017 21:41:41 -0200 Subject: [PATCH 1/3] Test the function readline with null parameter Test the function readline with null parameter (wrong because the function expects a string parameter). User Group: PHPSP #phptestfestbrasil http://phpsp.org.br/ --- readline_nullparam.phpt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 readline_nullparam.phpt diff --git a/readline_nullparam.phpt b/readline_nullparam.phpt new file mode 100644 index 0000000000..b0653a863b --- /dev/null +++ b/readline_nullparam.phpt @@ -0,0 +1,13 @@ +--TEST-- +Test the function readline with null parameter (wrong because the function expects a string parameter). +--CREDITS-- +Rodrigo Prado de Jesus +User Group: PHPSP #phptestfestbrasil +http://phpsp.org.br/ +--SKIPIF-- + +--FILE-- + +--EXPECTF-- From cf284df71f355c98bafcc730a740b5bbd8a61347 Mon Sep 17 00:00:00 2001 From: Rodrigo Prado Date: Tue, 7 Nov 2017 21:48:10 -0200 Subject: [PATCH 2/3] Rename readline_nullparam.phpt to ext/readline/tests/readline_nullparam.phpt --- .../readline/tests/readline_nullparam.phpt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename readline_nullparam.phpt => ext/readline/tests/readline_nullparam.phpt (100%) diff --git a/readline_nullparam.phpt b/ext/readline/tests/readline_nullparam.phpt similarity index 100% rename from readline_nullparam.phpt rename to ext/readline/tests/readline_nullparam.phpt From b05640cbdfd1ca86964304f68982ab4ec0a8c84f Mon Sep 17 00:00:00 2001 From: Rodrigo Prado Date: Wed, 8 Nov 2017 07:29:51 -0200 Subject: [PATCH 3/3] Update readline_nullparam.phpt --- ext/readline/tests/readline_nullparam.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/readline/tests/readline_nullparam.phpt b/ext/readline/tests/readline_nullparam.phpt index b0653a863b..0ebe69f7e5 100644 --- a/ext/readline/tests/readline_nullparam.phpt +++ b/ext/readline/tests/readline_nullparam.phpt @@ -11,3 +11,4 @@ http://phpsp.org.br/ $line = readline(null); ?> --EXPECTF-- +Warning: readline() expects parameter 1 to be string, null given in %s on line %d