xref: /PHP-7.2/ext/standard/tests/filters/001.phpt (revision 17ccbeec)
1--TEST--
2stream_filter_register() and invalid arguments
3--FILE--
4<?php
5
6var_dump(stream_filter_register("", ""));
7var_dump(stream_filter_register("test", ""));
8var_dump(stream_filter_register("", "test"));
9var_dump(stream_filter_register("------", "nonexistentclass"));
10var_dump(stream_filter_register(array(), "aa"));
11var_dump(stream_filter_register("", array()));
12
13echo "Done\n";
14?>
15--EXPECTF--
16Warning: stream_filter_register(): Filter name cannot be empty in %s on line %d
17bool(false)
18
19Warning: stream_filter_register(): Class name cannot be empty in %s on line %d
20bool(false)
21
22Warning: stream_filter_register(): Filter name cannot be empty in %s on line %d
23bool(false)
24bool(true)
25
26Warning: stream_filter_register() expects parameter 1 to be string, array given in %s on line %d
27bool(false)
28
29Warning: stream_filter_register() expects parameter 2 to be string, array given in %s on line %d
30bool(false)
31Done
32