Skip to content

Commit 95b8db9

Browse files
Making tests PSR-12 compliant
1 parent e86f567 commit 95b8db9

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

ext/standard/tests/strings/implode_error.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ Test implode() function: error conditions
44
<?php
55
/* only glue */
66
try {
7-
var_dump( implode("glue") );
7+
var_dump(implode("glue"));
88
} catch (TypeError $e) {
99
echo $e->getMessage(), "\n";
1010
}
1111

1212
/* NULL as pieces */
1313
try {
14-
var_dump( implode("glue", NULL) );
14+
var_dump(implode("glue", NULL));
1515
} catch (TypeError $e) {
1616
echo $e->getMessage(), "\n";
1717
}
1818

1919
/* integer as glue */
2020
try {
21-
var_dump( implode(12, "pieces") );
21+
var_dump(implode(12, "pieces"));
2222
} catch (TypeError $e) {
2323
echo $e->getMessage(), "\n";
2424
}
2525
?>
26-
--EXPECTF--
26+
--EXPECT--
2727
implode(): If argument #1 ($separator) is of type string, argument #2 ($array) must be of type array, null given
2828
implode(): If argument #1 ($separator) is of type string, argument #2 ($array) must be of type array, null given
2929
implode(): Argument #2 ($array) must be of type ?array, string given

ext/standard/tests/strings/implode_variation.phpt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Test implode() function
33
--FILE--
44
<?php
55
echo "*** Testing implode() for basic operations ***\n";
6-
$arrays = array (
6+
$arrays = array(
77
array(1,2),
88
array(1.1,2.2),
99
array(array(2),array(1)),
@@ -14,13 +14,13 @@ $arrays = array (
1414
);
1515
/* loop to output string with ', ' as $glue, using implode() */
1616
foreach ($arrays as $array) {
17-
var_dump( implode(', ', $array) );
17+
var_dump(implode(', ', $array));
1818
var_dump($array);
1919
}
2020

2121
echo "\n*** Testing implode() with variations of glue ***\n";
2222
/* checking possible variations */
23-
$pieces = array (
23+
$pieces = array(
2424
2,
2525
0,
2626
-639,
@@ -31,7 +31,7 @@ $pieces = array (
3131
" ",
3232
"string\x00with\x00...\0"
3333
);
34-
$glues = array (
34+
$glues = array(
3535
"TRUE",
3636
true,
3737
false,
@@ -73,7 +73,7 @@ try {
7373
echo $exception->getMessage() . "\n";
7474
}
7575
try {
76-
var_dump( implode(2, $sub_array) );
76+
var_dump(implode(2, $sub_array));
7777
} catch (TypeError $exception) {
7878
echo $exception->getMessage() . "\n";
7979
}
@@ -91,7 +91,7 @@ $obj = new foo(); //creating new object
9191
$arr = array();
9292
$arr[0] = &$obj;
9393
$arr[1] = &$obj;
94-
var_dump( implode(",", $arr) );
94+
var_dump(implode(",", $arr));
9595
var_dump($arr);
9696

9797
/* Checking on resource types */
@@ -105,7 +105,7 @@ $dir_handle = opendir( __DIR__ );
105105
/* store resources in array for comparison */
106106
$resources = array($file_handle, $dir_handle);
107107

108-
var_dump( implode("::", $resources) );
108+
var_dump(implode("::", $resources));
109109

110110
/* closing resource handles */
111111
fclose($file_handle);

ext/standard/tests/strings/join_error1.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class test
2929

3030
// array with different values
3131
$values = array (
32-
3332
// integer values
3433
0,
3534
1,
@@ -84,7 +83,7 @@ for($index = 0; $index < count($values); $index ++) {
8483
$pieces = $values [$index];
8584

8685
try {
87-
var_dump( join($glue, $pieces) );
86+
var_dump(join($glue, $pieces));
8887
} catch (TypeError $e) {
8988
echo $e->getMessage(), "\n";
9089
}

0 commit comments

Comments
 (0)