Graze\Supervisor\ProcessSupervisorTest::testSuccessfullyTerminatedPing PHP 메소드

testSuccessfullyTerminatedPing() 공개 메소드

    public function testSuccessfullyTerminatedPing()
    {
        $err = 'foo';
        $out = 'bar';
        $this->process->shouldReceive('isTerminated')->once()->withNoArgs()->andReturn(true);
        $this->process->shouldReceive('isSuccessful')->once()->withNoArgs()->andReturn(true);
        $this->process->shouldReceive('getErrorOutput')->once()->withNoArgs()->andReturn($err);
        $this->process->shouldReceive('getOutput')->once()->withNoArgs()->andReturn($out);
        $this->handler->shouldReceive('handlePass')->once()->with(0, $this->sup);
        $this->assertFalse($this->sup->ping());
        $this->assertEquals($err, $this->sup->stderr);
        $this->assertEquals($out, $this->sup->stdout);
    }