Skip to content

Commit 8e01fd5

Browse files
committed
Test nit
1 parent 661760a commit 8e01fd5

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

Zend/tests/numeric_strings/invalid_numeric_string_must_generate_warning_assign.phpt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Invalid numeric string E_WARNINGs, combined assignment operations
2+
Invalid numeric string TypeErrors and E_WARNINGs, combined assignment operations
33
--FILE--
44
<?php
55

@@ -63,18 +63,14 @@ try {
6363
echo $e->getMessage() . \PHP_EOL;
6464
}
6565
echo "---", PHP_EOL;
66-
try {
67-
$a = foxcache("31 enim");
68-
$a %= "37 ad";
69-
var_dump($a);
70-
} catch (DivisionByZeroError $e) {
71-
echo $e->getMessage() . \PHP_EOL;
72-
}
66+
$a = foxcache("31 enim");
67+
$a %= "37 ad";
68+
var_dump($a);
7369
try {
7470
$a = foxcache("minim");
7571
$a %= "veniam,";
7672
var_dump($a);
77-
} catch (\TypeError|DivisionByZeroError $e) {
73+
} catch (\TypeError $e) {
7874
echo get_class($e) . ': ' . $e->getMessage() . \PHP_EOL;
7975
}
8076
echo "---", PHP_EOL;

Zend/tests/numeric_strings/invalid_numeric_strings_must_generate_warning.phpt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Invalid numeric string E_WARNINGs
2+
Invalid numeric string TypeErrors and E_WARNINGs
33
--FILE--
44
<?php
55

@@ -38,14 +38,10 @@ try {
3838
echo $e->getMessage() . \PHP_EOL;
3939
}
4040
echo "---", PHP_EOL;
41-
try {
42-
var_dump("31 enim" % "37 ad");
43-
} catch (\DivisionByZeroError $e) {
44-
echo $e->getMessage() . \PHP_EOL;
45-
}
41+
var_dump("31 enim" % "37 ad");
4642
try {
4743
var_dump("minim" % "veniam,");
48-
} catch (\TypeError|\DivisionByZeroError $e) {
44+
} catch (\TypeError $e) {
4945
echo get_class($e) . ': ' . $e->getMessage() . \PHP_EOL;
5046
}
5147
echo "---", PHP_EOL;

0 commit comments

Comments
 (0)