Graze\Supervisor\SupervisorSupervisorTest::testUnsuccessfullyTerminatedPing PHP Method

testUnsuccessfullyTerminatedPing() public method

    public function testUnsuccessfullyTerminatedPing()
    {
        $exception = new Exception('foo');
        $this->supA->shouldReceive('ping')->once()->withNoArgs()->andReturn(true);
        $this->supB->shouldReceive('ping')->once()->withNoArgs()->andReturn(true);
        $this->supC->shouldReceive('ping')->once()->withNoArgs()->andThrow($exception);
        $this->handler->shouldReceive('handleFail')->once()->with(0, $this->sup, $exception);
        $this->assertTrue($this->sup->ping());
    }