Skip to content

Commit d4baef2

Browse files
committed
SkipLintProcess test fix
1 parent 0bdd183 commit d4baef2

File tree

1 file changed

+27
-18
lines changed

1 file changed

+27
-18
lines changed

tests/SkipLintProcess.phpt

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,32 @@ require_once __DIR__ . '/../src/Process.php';
99

1010
use Tester\Assert;
1111

12-
$filesToCheck = [
13-
__DIR__ . '/skip-on-5.3/class.php',
14-
__DIR__ . '/skip-on-5.3/trait.php',
15-
];
16-
17-
for ($i = 0; $i < 15; $i++) {
18-
$filesToCheck = array_merge($filesToCheck, $filesToCheck);
19-
}
20-
21-
$process = new \JakubOnderka\PhpParallelLint\SkipLintProcess('php', $filesToCheck);
22-
23-
while (!$process->isFinished()) {
24-
usleep(100);
25-
$process->getChunk();
12+
class SkipLintProcessTest extends Tester\TestCase
13+
{
14+
public function testLargeInput()
15+
{
16+
$filesToCheck = array(
17+
__DIR__ . '/skip-on-5.3/class.php',
18+
__DIR__ . '/skip-on-5.3/trait.php',
19+
);
20+
21+
for ($i = 0; $i < 15; $i++) {
22+
$filesToCheck = array_merge($filesToCheck, $filesToCheck);
23+
}
24+
25+
$process = new \JakubOnderka\PhpParallelLint\SkipLintProcess('php', $filesToCheck);
26+
27+
while (!$process->isFinished()) {
28+
usleep(100);
29+
$process->getChunk();
30+
}
31+
32+
foreach ($filesToCheck as $fileToCheck) {
33+
$status = $process->isSkipped($fileToCheck);
34+
Assert::notEqual(null, $status);
35+
}
36+
}
2637
}
2738

28-
foreach ($filesToCheck as $fileToCheck) {
29-
$status = $process->isSkipped($fileToCheck);
30-
Assert::notEqual(null, $status);
31-
}
39+
$skipLintProcessTest = new SkipLintProcessTest;
40+
$skipLintProcessTest->run();

0 commit comments

Comments
 (0)