Skip to content

Commit

Permalink
Update filter docs and tests
Browse files Browse the repository at this point in the history
Filter extension is better presented in the PHP manual. Some ext/filter/tests
included outdated functions or were duplicated.
  • Loading branch information
petk authored and krakjoe committed Oct 19, 2017
1 parent d275481 commit 2bc23f8
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 436 deletions.
331 changes: 0 additions & 331 deletions ext/filter/docs/filter.txt

This file was deleted.

41 changes: 0 additions & 41 deletions ext/filter/docs/input_get_args.php

This file was deleted.

4 changes: 2 additions & 2 deletions ext/filter/tests/006.phpt
@@ -1,11 +1,11 @@
--TEST--
filter() test
filter_input() test
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--POST--
foo=<b>abc</b>
--FILE--
<?php
<?php
echo filter_input(INPUT_POST, 'foo', FILTER_SANITIZE_STRIPPED);
?>
--EXPECT--
Expand Down
4 changes: 2 additions & 2 deletions ext/filter/tests/011.phpt
@@ -1,5 +1,5 @@
--TEST--
input_get()
filter_input()
--INI--
precision=14
--SKIPIF--
Expand Down Expand Up @@ -28,7 +28,7 @@ var_dump(filter_var(0, 0, 0, 0, 0));

echo "Done\n";
?>
--EXPECTF--
--EXPECTF--
string(4) "test"
string(18) "http://example.com"
string(27) "&#60;b&#62;test&#60;/b&#62;"
Expand Down
2 changes: 1 addition & 1 deletion ext/filter/tests/032.phpt
@@ -1,5 +1,5 @@
--TEST--
input_get_args()
filter_var_array()
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--
Expand Down
4 changes: 2 additions & 2 deletions ext/filter/tests/036.phpt
@@ -1,5 +1,5 @@
--TEST--
input_get_args() and references
filter_var_array() and references
--SKIPIF--
<?php if (!extension_loaded("filter")) print "skip"; ?>
--FILE--
Expand All @@ -22,7 +22,7 @@ var_dump($var); //should be still string(1) "1"

echo "Done\n";
?>
--EXPECTF--
--EXPECTF--
array(2) {
["test1"]=>
int(1)
Expand Down
55 changes: 0 additions & 55 deletions ext/filter/tests/bug7586.phpt

This file was deleted.

4 changes: 2 additions & 2 deletions ext/filter/tests/bug7733.phpt
@@ -1,5 +1,5 @@
--TEST--
filter_data() Float exponential weird result
filter_var() Float exponential weird result
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--
Expand All @@ -14,7 +14,7 @@ $data = array(
$out = filter_var($data, FILTER_VALIDATE_FLOAT, FILTER_REQUIRE_ARRAY);
var_dump($out);
?>
--EXPECTF--
--EXPECTF--
array(5) {
[0]=>
bool(false)
Expand Down

0 comments on commit 2bc23f8

Please sign in to comment.