Skip to content

Commit 41fe3bf

Browse files
committed
Update more tests (WIP)
1 parent 5715a39 commit 41fe3bf

16 files changed

+40
-181
lines changed

ext/ldap/tests/bug72021.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Chad Sikorra <[email protected]>
88
<?php
99
$subject = " Joe,= \rSmith ";
1010

11-
var_dump(ldap_escape($subject, null, LDAP_ESCAPE_DN));
11+
var_dump(ldap_escape($subject, '', LDAP_ESCAPE_DN));
1212
?>
1313
--EXPECT--
1414
string(24) "\20Joe\2c\3d \0dSmith\20"

ext/ldap/tests/bug73933.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ require_once('skipif.inc');
99
/* We are assuming 3333 is not connectable */
1010
$ldap = ldap_connect('127.0.0.1', 3333);
1111

12-
ldap_mod_replace($ldap, null, array(
12+
ldap_mod_replace($ldap, '', array(
1313
'lockoutTime' => array(0),
1414
));
1515

16-
ldap_modify_batch($ldap, null, array( [
16+
ldap_modify_batch($ldap, '', array( [
1717
"attrib" => "mail",
1818
"modtype" => LDAP_MODIFY_BATCH_ADD,
1919
"values" => [

ext/ldap/tests/ldap_escape_both.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ldap_escape() test filter and DN
77

88
$subject = 'foo=bar(baz)*';
99

10-
var_dump(ldap_escape($subject, null, LDAP_ESCAPE_DN | LDAP_ESCAPE_FILTER));
10+
var_dump(ldap_escape($subject, '', LDAP_ESCAPE_DN | LDAP_ESCAPE_FILTER));
1111

1212
?>
1313
--EXPECT--

ext/ldap/tests/ldap_escape_dn.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ldap_escape() test DN
77

88
$subject = 'foo=bar(baz)*';
99

10-
var_dump(ldap_escape($subject, null, LDAP_ESCAPE_DN));
10+
var_dump(ldap_escape($subject, '', LDAP_ESCAPE_DN));
1111

1212
?>
1313
--EXPECT--

ext/ldap/tests/ldap_read_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (!extension_loaded('ldap')) die('skip ldap extension not available');
88
<?php
99
$array = [123, 456, 789];
1010
try {
11-
ldap_read(null, null, null, $array);
11+
ldap_read(null, '', '', $array);
1212
} catch (TypeError $err) {}
1313
var_dump($array);
1414
?>

ext/pspell/tests/004.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ var_dump(pspell_config_runtogether($cfg, true));
2222
$p = pspell_new_config($cfg);
2323
var_dump(pspell_check($p, 'theoasis'));
2424

25-
var_dump(pspell_config_runtogether($cfg, NULL))
26-
2725
?>
2826
--EXPECT--
2927
bool(true)
@@ -32,4 +30,3 @@ bool(false)
3230
---
3331
bool(true)
3432
bool(true)
35-
bool(true)

ext/readline/tests/readline_write_history_001.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ $name = tempnam('/tmp', 'readline.tmp');
1313
readline_add_history('foo');
1414
readline_add_history('');
1515
readline_add_history(1);
16-
readline_add_history(NULL);
1716
readline_write_history($name);
1817

1918
var_dump(file_get_contents($name));
@@ -22,8 +21,7 @@ unlink($name);
2221

2322
?>
2423
--EXPECT--
25-
string(8) "foo
24+
string(7) "foo
2625

2726
1
28-
2927
"

ext/standard/tests/math/bindec_basic.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $values = array(111000111,
2626
011237,
2727
true,
2828
false,
29-
null);
29+
);
3030

3131
for ($i = 0; $i < count($values); $i++) {
3232
$res = bindec($values[$i]);
@@ -74,4 +74,3 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
7474
int(0)
7575
int(1)
7676
int(0)
77-
int(0)

ext/standard/tests/math/bindec_variation1.phpt

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
77
--FILE--
88
<?php
99
echo "*** Testing bindec() : usage variations ***\n";
10-
//get an unset variable
11-
$unset_var = 10;
12-
unset ($unset_var);
1310

1411
// heredoc string
1512
$heredoc = <<<EOT
@@ -34,10 +31,6 @@ $inputs = array(
3431
12.3456789000E-10,
3532
.5,
3633

37-
// null data
38-
/*10*/ NULL,
39-
null,
40-
4134
// boolean data
4235
/*12*/ true,
4336
false,
@@ -54,12 +47,6 @@ $inputs = array(
5447
'abcxyz',
5548
$heredoc,
5649

57-
// undefined data
58-
/*22*/ @$undefined_var,
59-
60-
// unset data
61-
/*23*/ @$unset_var,
62-
6350
// resource variable
6451
/*24*/ $fp
6552
);
@@ -122,7 +109,7 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
122109
int(0)
123110

124111
-- Iteration 10 --
125-
int(0)
112+
int(1)
126113

127114
-- Iteration 11 --
128115
int(0)
@@ -134,40 +121,28 @@ int(1)
134121
int(0)
135122

136123
-- Iteration 14 --
137-
int(1)
124+
int(0)
138125

139126
-- Iteration 15 --
140127
int(0)
141128

142129
-- Iteration 16 --
143-
int(0)
144-
145-
-- Iteration 17 --
146-
int(0)
147-
148-
-- Iteration 18 --
149130
bindec(): Argument #1 ($binary_string) must be of type string, array given
150131

151-
-- Iteration 19 --
132+
-- Iteration 17 --
152133

153134
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
154135
int(0)
155136

156-
-- Iteration 20 --
137+
-- Iteration 18 --
157138

158139
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
159140
int(0)
160141

161-
-- Iteration 21 --
142+
-- Iteration 19 --
162143

163144
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
164145
int(0)
165146

166-
-- Iteration 22 --
167-
int(0)
168-
169-
-- Iteration 23 --
170-
int(0)
171-
172-
-- Iteration 24 --
147+
-- Iteration 20 --
173148
bindec(): Argument #1 ($binary_string) must be of type string, resource given

ext/standard/tests/math/decbin_variation1.phpt

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
99
--FILE--
1010
<?php
1111
echo "*** Testing decbin() : usage variations ***\n";
12-
//get an unset variable
13-
$unset_var = 10;
14-
unset ($unset_var);
1512

1613
// heredoc string
1714
$heredoc = <<<EOT
@@ -43,10 +40,6 @@ $inputs = array(
4340
12.3456789000E-10,
4441
.5,
4542

46-
// null data
47-
/*12*/ NULL,
48-
null,
49-
5043
// boolean data
5144
/*14*/ true,
5245
false,
@@ -66,12 +59,6 @@ $inputs = array(
6659
// object data
6760
/*24*/ new classA(),
6861

69-
// undefined data
70-
/*25*/ @$undefined_var,
71-
72-
// unset data
73-
/*26*/ @$unset_var,
74-
7562
// resource variable
7663
/*27*/ $fp
7764
);
@@ -127,7 +114,7 @@ string(1) "0"
127114
string(1) "0"
128115

129116
-- Iteration 12 --
130-
string(1) "0"
117+
string(1) "1"
131118

132119
-- Iteration 13 --
133120
string(1) "0"
@@ -139,37 +126,25 @@ string(1) "1"
139126
string(1) "0"
140127

141128
-- Iteration 16 --
142-
string(1) "1"
129+
decbin(): Argument #1 ($num) must be of type int, string given
143130

144131
-- Iteration 17 --
145-
string(1) "0"
132+
decbin(): Argument #1 ($num) must be of type int, string given
146133

147134
-- Iteration 18 --
148-
decbin(): Argument #1 ($num) must be of type int, string given
135+
decbin(): Argument #1 ($num) must be of type int, array given
149136

150137
-- Iteration 19 --
151138
decbin(): Argument #1 ($num) must be of type int, string given
152139

153140
-- Iteration 20 --
154-
decbin(): Argument #1 ($num) must be of type int, array given
141+
decbin(): Argument #1 ($num) must be of type int, string given
155142

156143
-- Iteration 21 --
157144
decbin(): Argument #1 ($num) must be of type int, string given
158145

159146
-- Iteration 22 --
160-
decbin(): Argument #1 ($num) must be of type int, string given
161-
162-
-- Iteration 23 --
163-
decbin(): Argument #1 ($num) must be of type int, string given
164-
165-
-- Iteration 24 --
166147
decbin(): Argument #1 ($num) must be of type int, classA given
167148

168-
-- Iteration 25 --
169-
string(1) "0"
170-
171-
-- Iteration 26 --
172-
string(1) "0"
173-
174-
-- Iteration 27 --
149+
-- Iteration 23 --
175150
decbin(): Argument #1 ($num) must be of type int, resource given

ext/standard/tests/math/dechex_variation1.phpt

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
99
--FILE--
1010
<?php
1111
echo "*** Testing dechex() : usage variations ***\n";
12-
//get an unset variable
13-
$unset_var = 10;
14-
unset ($unset_var);
1512

1613
// heredoc string
1714
$heredoc = <<<EOT
@@ -43,10 +40,6 @@ $inputs = array(
4340
12.3456789000E-10,
4441
.5,
4542

46-
// null data
47-
/*12*/ NULL,
48-
null,
49-
5043
// boolean data
5144
/*14*/ true,
5245
false,
@@ -66,12 +59,6 @@ $inputs = array(
6659
// object data
6760
/*24*/ new classA(),
6861

69-
// undefined data
70-
/*25*/ @$undefined_var,
71-
72-
// unset data
73-
/*26*/ @$unset_var,
74-
7562
// resource variable
7663
/*27*/ $fp
7764
);
@@ -127,7 +114,7 @@ string(1) "0"
127114
string(1) "0"
128115

129116
-- Iteration 12 --
130-
string(1) "0"
117+
string(1) "1"
131118

132119
-- Iteration 13 --
133120
string(1) "0"
@@ -139,37 +126,25 @@ string(1) "1"
139126
string(1) "0"
140127

141128
-- Iteration 16 --
142-
string(1) "1"
129+
dechex(): Argument #1 ($num) must be of type int, string given
143130

144131
-- Iteration 17 --
145-
string(1) "0"
132+
dechex(): Argument #1 ($num) must be of type int, string given
146133

147134
-- Iteration 18 --
148-
dechex(): Argument #1 ($num) must be of type int, string given
135+
dechex(): Argument #1 ($num) must be of type int, array given
149136

150137
-- Iteration 19 --
151138
dechex(): Argument #1 ($num) must be of type int, string given
152139

153140
-- Iteration 20 --
154-
dechex(): Argument #1 ($num) must be of type int, array given
141+
dechex(): Argument #1 ($num) must be of type int, string given
155142

156143
-- Iteration 21 --
157144
dechex(): Argument #1 ($num) must be of type int, string given
158145

159146
-- Iteration 22 --
160-
dechex(): Argument #1 ($num) must be of type int, string given
161-
162-
-- Iteration 23 --
163-
dechex(): Argument #1 ($num) must be of type int, string given
164-
165-
-- Iteration 24 --
166147
dechex(): Argument #1 ($num) must be of type int, classA given
167148

168-
-- Iteration 25 --
169-
string(1) "0"
170-
171-
-- Iteration 26 --
172-
string(1) "0"
173-
174-
-- Iteration 27 --
149+
-- Iteration 23 --
175150
dechex(): Argument #1 ($num) must be of type int, resource given

0 commit comments

Comments
 (0)