Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4e669f3

Browse files
make test backward compatible to old PHP versions
1 parent 160aa71 commit 4e669f3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

‎tests/TableFormatterTest.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function test_length()
104104

105105
$tf = new TableFormatter();
106106
$tf->setBorder('|');
107-
$result = $tf->format([20, '*'], [$text, 'test']);
107+
$result = $tf->format(array(20, '*'), array($text, 'test'));
108108

109109
$this->assertEquals($expect, trim($result));
110110
}
@@ -118,7 +118,7 @@ public function test_colorlength()
118118

119119
$tf = new TableFormatter();
120120
$tf->setBorder('|');
121-
$result = $tf->format([20, '*'], [$text, 'test']);
121+
$result = $tf->format(array(20, '*'), array($text, 'test'));
122122

123123
$this->assertEquals($expect, trim($result));
124124
}
@@ -135,7 +135,7 @@ public function test_onewrap()
135135
$tf->setMaxWidth(11);
136136
$tf->setBorder('|');
137137

138-
$result = $tf->format([5, '*'], [$col1, $col2]);
138+
$result = $tf->format(array(5, '*'), array($col1, $col2));
139139
$this->assertEquals($expect, $result);
140140
}
141141

@@ -149,7 +149,7 @@ public function test_colorwrap($text, $expect)
149149
$tf = new TableFormatter();
150150
$tf->setMaxWidth(15);
151151

152-
$this->assertEquals($expect, $tf->format(['*'], [$text]));
152+
$this->assertEquals($expect, $tf->format(array('*'), array($text)));
153153
}
154154

155155
/**
@@ -166,23 +166,23 @@ public function colorwrapProvider()
166166
return $color->wrap($str, Colors::C_CYAN);
167167
};
168168

169-
return [
170-
'color word line 1' => [
169+
return array(
170+
'color word line 1' => array(
171171
"This is ". $wrap("cyan") . " text wrapping",
172172
"This is {$cyan}cyan{$reset}\ntext wrapping \n",
173-
],
174-
'color word line 2' => [
173+
),
174+
'color word line 2' => array(
175175
"This is text ". $wrap("cyan") . " wrapping",
176176
"This is text \n{$cyan}cyan{$reset} wrapping \n",
177-
],
178-
'color across lines' => [
179-
"This is ". $wrap("cyan text",) . " wrapping",
177+
),
178+
'color across lines' => array(
179+
"This is ". $wrap("cyan text") . " wrapping",
180180
"This is {$cyan}cyan \ntext{$reset} wrapping \n",
181-
],
182-
'color across lines until end' => [
181+
),
182+
'color across lines until end' => array(
183183
"This is ". $wrap("cyan text wrapping"),
184184
"This is {$cyan}cyan \n{$cyan}text wrapping{$reset}\n",
185-
],
186-
];
185+
),
186+
);
187187
}
188188
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /