Skip to content

Commit 7e73176

Browse files
committed
Remove duplicate testing conditions
1 parent bd9f4fa commit 7e73176

File tree

3 files changed

+1
-31
lines changed

3 files changed

+1
-31
lines changed

ext/date/tests/bug67118.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class mydt extends datetime
1212
$tz = new DateTimeZone($tz);
1313
}
1414
try {
15-
@parent::__construct($time, $tz);
15+
parent::__construct($time, $tz);
1616
} catch (Exception $e) {
1717
echo "Bad date" . $this->format("Y") . "\n";
1818
}

ext/standard/tests/array/array_walk_error2.phpt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function callback2($value, $key, $user_data1, $user_data2) {
1616
}
1717
echo "*** Testing array_walk() : error conditions - callback parameters ***\n";
1818

19-
// expected: Missing argument Warning
2019
try {
2120
var_dump( array_walk($input, "callback1") );
2221
} catch (Throwable $e) {
@@ -28,18 +27,6 @@ try {
2827
echo "Exception: " . $e->getMessage() . "\n";
2928
}
3029

31-
// expected: Warning is suppressed
32-
try {
33-
var_dump( @array_walk($input, "callback1") );
34-
} catch (Throwable $e) {
35-
echo "Exception: " . $e->getMessage() . "\n";
36-
}
37-
try {
38-
var_dump( @array_walk($input, "callback2", 4) );
39-
} catch (Throwable $e) {
40-
echo "Exception: " . $e->getMessage() . "\n";
41-
}
42-
4330
echo "-- Testing array_walk() function with too many callback parameters --\n";
4431
try {
4532
var_dump( array_walk($input, "callback1", 20, 10) );
@@ -53,8 +40,6 @@ echo "Done";
5340
*** Testing array_walk() : error conditions - callback parameters ***
5441
Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected
5542
Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected
56-
Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected
57-
Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected
5843
-- Testing array_walk() function with too many callback parameters --
5944
Exception: array_walk() expects at most 3 arguments, 4 given
6045
Done

ext/standard/tests/array/array_walk_recursive_error2.phpt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function callback2($value, $key, $user_data1, $user_data2) {
1616
}
1717
echo "*** Testing array_walk_recursive() : error conditions - callback parameters ***\n";
1818

19-
// expected: Missing argument Warning
2019
try {
2120
var_dump( array_walk_recursive($input, "callback1") );
2221
} catch (Throwable $e) {
@@ -28,18 +27,6 @@ try {
2827
echo "Exception: " . $e->getMessage() . "\n";
2928
}
3029

31-
// expected: Warning is suppressed
32-
try {
33-
var_dump( @array_walk_recursive($input, "callback1") );
34-
} catch (Throwable $e) {
35-
echo "Exception: " . $e->getMessage() . "\n";
36-
}
37-
try {
38-
var_dump( @array_walk_recursive($input, "callback2", 4) );
39-
} catch (Throwable $e) {
40-
echo "Exception: " . $e->getMessage() . "\n";
41-
}
42-
4330
echo "-- Testing array_walk_recursive() function with too many callback parameters --\n";
4431
try {
4532
var_dump( array_walk_recursive($input, "callback1", 20, 10) );
@@ -53,8 +40,6 @@ echo "Done";
5340
*** Testing array_walk_recursive() : error conditions - callback parameters ***
5441
Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected
5542
Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected
56-
Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected
57-
Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected
5843
-- Testing array_walk_recursive() function with too many callback parameters --
5944
Exception: array_walk_recursive() expects at most 3 arguments, 4 given
6045
Done

0 commit comments

Comments
 (0)