1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00
This commit is contained in:
Jordi Boggiano 2021-02-25 13:46:52 +01:00
parent 52967c32cf
commit 40800df6bd
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
22 changed files with 72 additions and 79 deletions

View file

@ -123,7 +123,7 @@ class AllFunctionalTest extends TestCase
$expected = $testData['EXPECT'];
$line = 1;
for ($i = 0, $j = 0; $i < strlen($expected); ) {
for ($i = 0, $j = 0; $i < strlen($expected);) {
if ($expected[$i] === "\n") {
$line++;
}
@ -138,7 +138,7 @@ class AllFunctionalTest extends TestCase
} else {
$this->fail(
'Failed to match pattern '.$regex.' at line '.$line.' / abs offset '.$i.': '
.substr($output, $j, min(strpos($output, "\n", $j)-$j, 100)).PHP_EOL.PHP_EOL.
.substr($output, $j, min(strpos($output, "\n", $j) - $j, 100)).PHP_EOL.PHP_EOL.
'Output:'.PHP_EOL.$output
);
}
@ -146,8 +146,8 @@ class AllFunctionalTest extends TestCase
if ($expected[$i] !== $output[$j]) {
$this->fail(
'Output does not match expectation at line '.$line.' / abs offset '.$i.': '.PHP_EOL
.'-'.substr($expected, $i, min(strpos($expected, "\n", $i)-$i, 100)).PHP_EOL
.'+'.substr($output, $j, min(strpos($output, "\n", $j)-$j, 100)).PHP_EOL.PHP_EOL
.'-'.substr($expected, $i, min(strpos($expected, "\n", $i) - $i, 100)).PHP_EOL
.'+'.substr($output, $j, min(strpos($output, "\n", $j) - $j, 100)).PHP_EOL.PHP_EOL
.'Output:'.PHP_EOL.$output
);
}