public function testProcessCrashWithActiveTest() { $request = new TestRequest(1, 'a', 'b', 'c'); $this->executor->run($request); $this->executor->onStdErr("a message"); $this->executor->onExit(1); Phake::verify($this->distributor, Phake::atMost(1))->testCompleted(Phake::anyParameters()); Phake::verify($this->distributor)->testCompleted($this->executor, Phake::capture($response)); $this->assertEquals(1, $response->getId()); $this->assertEquals("Worker1 died\na message", $response->getErrors()[0]->message); }