Skip to content

Commit 8b36be2

Browse files
committed
Fix indentation and whitespaces in tests
In preparation for GH-5074
1 parent ee87e86 commit 8b36be2

20 files changed

+174
-171
lines changed

ext/ctype/tests/ctype_space_variation1.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class classA
3131

3232
// heredoc string
3333
$heredoc = <<<EOT
34-
34+
\t
3535
EOT;
3636

3737
// get a resource variable
@@ -92,7 +92,7 @@ foreach($inputs as $input) {
9292
echo "\n-- Iteration $iterator --\n";
9393
var_dump( ctype_space($input) );
9494
$iterator++;
95-
};
95+
}
9696

9797
fclose($fp);
9898

ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ ini_set("intl.error_level", E_WARNING);
1212
//ini_set("intl.default_locale", "nl");
1313

1414
$mf = new MessageFormatter('en_US',"
15-
none {a}
16-
number {b,number}
17-
number integer {c,number,integer}
18-
number currency {d,number,currency}
19-
number percent {e,number,percent}
20-
date {f,date}
21-
time {g,time}
22-
spellout {h,spellout}
23-
ordinal {i,ordinal}
24-
duration {j,duration}
25-
");
15+
none {a}
16+
number {b,number}
17+
number integer {c,number,integer}
18+
number currency {d,number,currency}
19+
number percent {e,number,percent}
20+
date {f,date}
21+
time {g,time}
22+
spellout {h,spellout}
23+
ordinal {i,ordinal}
24+
duration {j,duration}
25+
");
2626

2727
$ex = "1336317965.5 str";
2828
var_dump($mf->format(array(
@@ -41,14 +41,14 @@ var_dump($mf->format(array(
4141
?>
4242
--EXPECTF--
4343
string(%d) "
44-
none 1336317965.5 str
45-
number 1,336,317,965.5
46-
number integer 1,336,317,965
47-
number currency $1,336,317,965.50
48-
number percent 133,631,796,550%
49-
date May %d, 2012
50-
time %d:%d:05 PM
51-
spellout one billion three hundred thirty-six million three hundred seventeen thousand nine hundred sixty-five point five
52-
ordinal 1,336,317,966th
53-
duration 371,199:26:06
54-
"
44+
none 1336317965.5 str
45+
number 1,336,317,965.5
46+
number integer 1,336,317,965
47+
number currency $1,336,317,965.50
48+
number percent 133,631,796,550%
49+
date May %d, 2012
50+
time %d:%d:05 PM
51+
spellout one billion three hundred thirty-six million three hundred seventeen thousand nine hundred sixty-five point five
52+
ordinal 1,336,317,966th
53+
duration 371,199:26:06
54+
"

ext/reflection/tests/ReflectionClass_getDocComment_001.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ opcache.save_comments=1
1010
/**
1111
1212
13-
My
13+
My
1414
Doc
15-
* Comment
15+
* Comment
1616
for A
1717
1818
* */
@@ -60,9 +60,9 @@ foreach ($classes as $class) {
6060
string(%d) "/**
6161

6262

63-
My
63+
My
6464
Doc
65-
* Comment
65+
* Comment
6666
for A
6767

6868
* */"

ext/simplexml/tests/bug38354.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Bug #38354 (Unwanted reformatting of XML when using AsXML)
77

88
$xml = simplexml_load_string(
99
'<code>
10-
<a href="javascript:alert(\'1\');"><strong>Item Two</strong></a>
10+
<a href="javascript:alert(\'1\');"><strong>Item Two</strong></a>
1111
</code>'
1212
);
1313

@@ -18,9 +18,9 @@ foreach ($xml->xpath("//*") as $element) {
1818
echo "Done\n";
1919
?>
2020
--EXPECT--
21-
string(101) "<?xml version="1.0"?>
21+
string(104) "<?xml version="1.0"?>
2222
<code>
23-
<a href="javascript:alert('1');"><strong>Item Two</strong></a>
23+
<a href="javascript:alert('1');"><strong>Item Two</strong></a>
2424
</code>
2525
"
2626
string(62) "<a href="javascript:alert('1');"><strong>Item Two</strong></a>"

ext/standard/tests/file/flock_variation.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Description: PHP supports a portable way of locking complete files
99
*/
1010

1111
echo "*** Testing flock() fun with the various operation and
12-
wouldblock values ***\n";
12+
wouldblock values ***\n";
1313

1414
$file = preg_replace("~\.phpt?$~", null, __FILE__);
1515
$fp = fopen($file, "w");
@@ -67,7 +67,7 @@ echo "\n*** Done ***\n";
6767
?>
6868
--EXPECT--
6969
*** Testing flock() fun with the various operation and
70-
wouldblock values ***
70+
wouldblock values ***
7171
--- Outer iteration 0 ---
7272
bool(true)
7373
-- Inner iteration 0 in 0 --

ext/standard/tests/file/fpassthru_basic.phpt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Description: Reads to EOF on the given file pointer from the current position
1111
$file_name = __DIR__."/passthru.tmp";
1212
$write_handle = fopen($file_name, "w");
1313

14-
$string = "Hello, world\n, abcdefg\tadsdsfdf\n8u2394723947\t$%$%#$%#$%#^#%^
14+
$string = "Hello, world\n, abcdefg\tadsdsfdf\n8u2394723947\t$%$%#$%#$%#^#%^
1515
Hello, world\n, abcdefg\tadsdsfdf\n8u2394723947\t$%$%#$%#$%#^#%^\n";
1616
if(substr(PHP_OS, 0, 3) == "WIN") {
1717
$string = str_replace("\r",'', $string);
@@ -68,60 +68,60 @@ unlink(__DIR__."/passthru.tmp");
6868
-- Before seek operation --
6969
Hello, world
7070
, abcdefg adsdsfdf
71-
8u2394723947 $%$%#$%#$%#^#%^
71+
8u2394723947 $%$%#$%#$%#^#%^
7272
Hello, world
7373
, abcdefg adsdsfdf
7474
8u2394723947 $%$%#$%#$%#^#%^
75-
int(133)
75+
int(132)
7676

7777
-- After seeking position to 0 --
7878
Hello, world
7979
, abcdefg adsdsfdf
80-
8u2394723947 $%$%#$%#$%#^#%^
80+
8u2394723947 $%$%#$%#$%#^#%^
8181
Hello, world
8282
, abcdefg adsdsfdf
8383
8u2394723947 $%$%#$%#$%#^#%^
84-
int(133)
84+
int(132)
8585

8686
-- After seeking position to 3 --
8787
lo, world
8888
, abcdefg adsdsfdf
89-
8u2394723947 $%$%#$%#$%#^#%^
89+
8u2394723947 $%$%#$%#$%#^#%^
9090
Hello, world
9191
, abcdefg adsdsfdf
9292
8u2394723947 $%$%#$%#$%#^#%^
93-
int(130)
93+
int(129)
9494

9595
-- After seeking position to 13 --
9696
, abcdefg adsdsfdf
97-
8u2394723947 $%$%#$%#$%#^#%^
97+
8u2394723947 $%$%#$%#$%#^#%^
9898
Hello, world
9999
, abcdefg adsdsfdf
100100
8u2394723947 $%$%#$%#$%#^#%^
101-
int(120)
101+
int(119)
102102

103103
-- After seeking position to 14 --
104104
abcdefg adsdsfdf
105-
8u2394723947 $%$%#$%#$%#^#%^
105+
8u2394723947 $%$%#$%#$%#^#%^
106106
Hello, world
107107
, abcdefg adsdsfdf
108108
8u2394723947 $%$%#$%#$%#^#%^
109-
int(119)
109+
int(118)
110110

111111
-- After seeking position to 23 --
112112
adsdsfdf
113-
8u2394723947 $%$%#$%#$%#^#%^
113+
8u2394723947 $%$%#$%#$%#^#%^
114114
Hello, world
115115
, abcdefg adsdsfdf
116116
8u2394723947 $%$%#$%#$%#^#%^
117-
int(110)
117+
int(109)
118118

119119
-- After seeking position to 34 --
120-
2394723947 $%$%#$%#$%#^#%^
120+
2394723947 $%$%#$%#$%#^#%^
121121
Hello, world
122122
, abcdefg adsdsfdf
123123
8u2394723947 $%$%#$%#$%#^#%^
124-
int(99)
124+
int(98)
125125

126126
-- After seeking position to 1000 --
127127
int(0)

ext/standard/tests/general_functions/print_r.phpt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ $strings = array (
101101
'PHP',
102102
"abcd\x0n1234\x0005678\x0000efgh\xijkl", // strings with hexadecimal NULL
103103
"abcd\0efgh\0ijkl\x00mnop\x000qrst\00uvwx\0000yz", // strings with octal NULL
104-
"1234\t\n5678\n\t9100\rabcda" // strings with escape characters
104+
"1234\t\n5678\n\t9100\"abcda" // strings with escape characters
105105
);
106106
/* calling check_printr() to display contents of strings using print_r() */
107107
check_printr($strings);
@@ -240,8 +240,8 @@ $resources = array (
240240
using print_r() */
241241
check_printr($resources);
242242

243-
echo "\n*** Testing print_r() on different combinations of scalar
244-
and non-scalar variables ***\n";
243+
echo "\n*** Testing print_r() on different combinations of scalar
244+
and non-scalar variables ***\n";
245245
/* a variable which is unset */
246246
$unset_var = 10.5;
247247
unset($unset_var);
@@ -604,13 +604,13 @@ abcdefghijklmnop0qrstuvwx0yz
604604
-- Iteration 14 --
605605
1234
606606
5678
607-
9100abcda
607+
9100"abcda
608608
1234
609609
5678
610-
9100abcda
610+
9100"abcda
611611
1234
612612
5678
613-
9100abcda
613+
9100"abcda
614614
*** Testing print_r() on boolean variables ***
615615

616616
-- Iteration 1 --
@@ -1462,15 +1462,15 @@ object_class Object
14621462
*** Testing print_r() on resources ***
14631463

14641464
-- Iteration 1 --
1465-
Resource id #%d
1466-
Resource id #%d
1467-
Resource id #%d
1465+
Resource id #5
1466+
Resource id #5
1467+
Resource id #5
14681468
-- Iteration 2 --
1469-
Resource id #%d
1470-
Resource id #%d
1471-
Resource id #%d
1472-
*** Testing print_r() on different combinations of scalar
1473-
and non-scalar variables ***
1469+
Resource id #6
1470+
Resource id #6
1471+
Resource id #6
1472+
*** Testing print_r() on different combinations of scalar
1473+
and non-scalar variables ***
14741474

14751475
-- Iteration 1 --
14761476
Array

ext/standard/tests/general_functions/print_r_64bit.phpt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ $strings = array (
105105
'PHP',
106106
"abcd\x0n1234\x0005678\x0000efgh\xijkl", // strings with hexadecimal NULL
107107
"abcd\0efgh\0ijkl\x00mnop\x000qrst\00uvwx\0000yz", // strings with octal NULL
108-
"1234\t\n5678\n\t9100\rabcda" // strings with escape characters
108+
"1234\t\n5678\n\t9100\"abcda" // strings with escape characters
109109
);
110110
/* calling check_printr() to display contents of strings using print_r() */
111111
check_printr($strings);
@@ -244,8 +244,8 @@ $resources = array (
244244
using print_r() */
245245
check_printr($resources);
246246

247-
echo "\n*** Testing print_r() on different combinations of scalar
248-
and non-scalar variables ***\n";
247+
echo "\n*** Testing print_r() on different combinations of scalar
248+
and non-scalar variables ***\n";
249249
/* a variable which is unset */
250250
$unset_var = 10.5;
251251
unset($unset_var);
@@ -608,13 +608,13 @@ abcdefghijklmnop0qrstuvwx0yz
608608
-- Iteration 14 --
609609
1234
610610
5678
611-
9100abcda
611+
9100"abcda
612612
1234
613613
5678
614-
9100abcda
614+
9100"abcda
615615
1234
616616
5678
617-
9100abcda
617+
9100"abcda
618618
*** Testing print_r() on boolean variables ***
619619

620620
-- Iteration 1 --
@@ -1473,8 +1473,8 @@ Resource id #5
14731473
Resource id #6
14741474
Resource id #6
14751475
Resource id #6
1476-
*** Testing print_r() on different combinations of scalar
1477-
and non-scalar variables ***
1476+
*** Testing print_r() on different combinations of scalar
1477+
and non-scalar variables ***
14781478

14791479
-- Iteration 1 --
14801480
Array

ext/standard/tests/general_functions/var_dump.phpt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ $resources = array (
239239
using var_dump() */
240240
check_vardump($resources);
241241

242-
echo "\n*** Testing var_dump() on different combinations of scalar
243-
and non-scalar variables ***\n";
242+
echo "\n*** Testing var_dump() on different combinations of scalar
243+
and non-scalar variables ***\n";
244244
/* a variable which is unset */
245245
$unset_var = 10.5;
246246
unset($unset_var);
@@ -448,9 +448,10 @@ string(29) "abcdn12340567800efgh\xijkl"
448448
-- Iteration 13 --
449449
string(34) "abcdefghijklmnop0qrstuvwx0yz"
450450
-- Iteration 14 --
451-
string(22) "1234
451+
string(22) "1234
452452
5678
453-
9100abcda"
453+
9100
454+
abcda"
454455

455456
*** Testing var_dump() on boolean variables ***
456457
-- Iteration 1 --
@@ -836,8 +837,8 @@ resource(%d) of type (stream)
836837
-- Iteration 2 --
837838
resource(%d) of type (stream)
838839

839-
*** Testing var_dump() on different combinations of scalar
840-
and non-scalar variables ***
840+
*** Testing var_dump() on different combinations of scalar
841+
and non-scalar variables ***
841842
-- Iteration 1 --
842843
array(3) {
843844
[0]=>
@@ -1102,9 +1103,10 @@ array(14) {
11021103
[12]=>
11031104
string(34) "abcdefghijklmnop0qrstuvwx0yz"
11041105
[13]=>
1105-
string(22) "1234
1106+
string(22) "1234
11061107
5678
1107-
9100abcda"
1108+
9100
1109+
abcda"
11081110
}
11091111
array(15) {
11101112
[0]=>

0 commit comments

Comments
 (0)