This repository was archived by the owner on Feb 6, 2019. It is now read-only.
File tree 1 file changed +7
-35
lines changed
1 file changed +7
-35
lines changed Original file line number Diff line number Diff line change @@ -31,49 +31,21 @@ public function testProcessCheckSuccessNegative()
31
31
$ this ->assertFalse (checkSuccess (null ));
32
32
}
33
33
34
- public function testProcessCheckFailNegative ()
35
- {
36
- $ pid = forkTask (function () {
37
- usleep (1 );
38
- });
39
-
40
- sleep (1 );
41
- $ this ->assertFalse (checkFail (null ));
42
- $ this ->assertFalse (checkFail ($ pid ));
43
- }
44
-
45
- public function testProcessCheckAvailablePositive ()
46
- {
47
- $ pid = forkTask (function () {
48
- usleep (1 );
49
- });
50
-
51
- if ($ pid !== null ) {
52
- $ this ->assertTrue (checkAvailable ($ pid ));
53
- }
54
- }
55
-
56
- public function testProcessCheckAvailableNegative ()
57
- {
58
- $ this ->assertFalse (checkAvailable (null ));
59
- }
60
-
61
- public function checkCloseForkPositive ()
34
+ public function testCheckCloseForkPositive ()
62
35
{
63
36
$ pid = forkTask (function () {
64
37
sleep (2 );
65
38
});
66
39
67
- $ return = closeTask ($ pid);
68
-
69
- $ this ->assertFalse ( checkAvailable ( $ pid ) );
70
- $ this -> assertTrue ( $ return );
40
+ if ($ pid !== null ) {
41
+ $ return = closeTask ( $ pid );
42
+ $ this ->assertTrue ( $ return );
43
+ }
71
44
}
72
45
73
- public function checkCloseForkNegative ()
46
+ public function testCheckCloseForkNegative ()
74
47
{
75
- $ return = closeTask (99999999999999999999999999 );
76
-
48
+ $ return = closeTask (999999 );
77
49
$ this ->assertFalse ($ return );
78
50
}
79
51
}
You can’t perform that action at this time.
0 commit comments