@@ -9,23 +9,32 @@ require_once __DIR__ . '/../src/Process.php';
9
9
10
10
use Tester \Assert ;
11
11
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
+ }
26
37
}
27
38
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