Skip to content

Commit

Permalink
Added basic stream_filter_register test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcq8 authored and petk committed Feb 14, 2019
1 parent 6bf1f43 commit 31a0130
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ext/standard/tests/streams/stream_filter_register.phpt
@@ -0,0 +1,25 @@
--TEST--
testing the behavior of stream_filter_register
--CREDITS--
Robrecht Plaisier <php@mcq8.be>
User Group: PHP-WVL & PHPGent #PHPTestFest
--FILE--
<?php
class foo extends php_user_filter {
function filter($in, $out, &$consumed, $closing) {
}
}

class bar extends php_user_filter {
function filter($in, $out, &$consumed, $closing) {
}
}

var_dump(stream_filter_register("myfilter","foo"));
var_dump(stream_filter_register("myfilter","bar"));
var_dump(stream_filter_register("foo","foo"));
?>
--EXPECT--
bool(true)
bool(false)
bool(true)

0 comments on commit 31a0130

Please sign in to comment.