@@ 61-68 (lines=8) @@ | ||
58 | $this->assertAttributeEquals($expectedQueue, 'queue', $processManager); |
|
59 | } |
|
60 | ||
61 | public function testEnqueue() |
|
62 | { |
|
63 | $processManager = new ProcessManager($this->factory); |
|
64 | $promise = $processManager->enqueue($this->directory); |
|
65 | ||
66 | $this->assertAttributeCount(1, 'queue', $processManager); |
|
67 | $this->assertInstanceOf(PromiseInterface::class, $promise); |
|
68 | } |
|
69 | ||
70 | public function testEnqueueWithoutCwd() |
|
71 | { |
|
@@ 70-77 (lines=8) @@ | ||
67 | $this->assertInstanceOf(PromiseInterface::class, $promise); |
|
68 | } |
|
69 | ||
70 | public function testEnqueueWithoutCwd() |
|
71 | { |
|
72 | $processManager = new ProcessManager($this->factory); |
|
73 | $promise = $processManager->enqueue(); |
|
74 | ||
75 | $this->assertAttributeCount(1, 'queue', $processManager); |
|
76 | $this->assertInstanceOf(PromiseInterface::class, $promise); |
|
77 | } |
|
78 | ||
79 | public function testEnqueueFulfilledPromise() |
|
80 | { |
|
@@ 136-147 (lines=12) @@ | ||
133 | } |
|
134 | ||
135 | /** @depends testEnqueue */ |
|
136 | public function testRunWithTick() |
|
137 | { |
|
138 | $processManager = new ProcessManager($this->factory); |
|
139 | $processManager->enqueue($this->directory); |
|
140 | ||
141 | $ticks = 0; |
|
142 | $processManager->run(function() use (&$ticks) { |
|
143 | $ticks++; |
|
144 | }); |
|
145 | ||
146 | $this->assertGreaterThan(0, $ticks); |
|
147 | } |
|
148 | } |
|
149 |