Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ext/readline/tests/readline_nullparam.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--TEST--
Test the function readline with null parameter (wrong because the function expects a string parameter).
--CREDITS--
Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
User Group: PHPSP #phptestfestbrasil
http://phpsp.org.br/
--SKIPIF--
<?php if (!extension_loaded("readline") die("skip"); ?>
--FILE--
<?php
$line = readline(null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be an unnecessary test of ZPP ... and it seems incomplete anyway ...

?>
--EXPECTF--
Warning: readline() expects parameter 1 to be string, null given in %s on line %d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unnecessary test of ZPP.