-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathSkipLintProcessTest.php
More file actions
35 lines (28 loc) · 1.02 KB
/
SkipLintProcessTest.php
File metadata and controls
35 lines (28 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace PHP_Parallel_Lint\PhpParallelLint\Tests\Unit\Process;
use PHP_Parallel_Lint\PhpParallelLint\Process\PhpExecutable;
use PHP_Parallel_Lint\PhpParallelLint\Process\SkipLintProcess;
use PHP_Parallel_Lint\PhpParallelLint\Tests\UnitTestCase;
class SkipLintProcessTest extends UnitTestCase
{
public function testLargeInput()
{
$filesToCheck = array(
PL_TESTROOT . '/fixtures/skip-on-5.3/class.php',
PL_TESTROOT . '/fixtures/skip-on-5.3/trait.php',
);
for ($i = 0; $i < 15; $i++) {
$filesToCheck = array_merge($filesToCheck, $filesToCheck);
}
$phpExecutable = PhpExecutable::getPhpExecutable('php');
$process = new SkipLintProcess($phpExecutable, $filesToCheck);
while (!$process->isFinished()) {
usleep(100);
$process->getChunk();
}
foreach ($filesToCheck as $fileToCheck) {
$status = $process->isSkipped($fileToCheck);
$this->assertNotNull($status);
}
}
}