public function testGetProcess() { $this->process->shouldReceive('getCommandLine')->once()->withNoArgs()->andReturn('foo'); $this->process->shouldReceive('getExitCode')->once()->withNoArgs()->andReturn(1); $this->process->shouldReceive('getExitCodeText')->once()->withNoArgs()->andReturn('bar'); $this->process->shouldReceive('getOutput')->once()->withNoArgs()->andReturn('baz'); $this->process->shouldReceive('getErrorOutput')->once()->withNoArgs()->andReturn('bam'); $exception = new TerminatedProcessException($this->process); $this->assertSame($this->process, $exception->getProcess()); }