fXmlRpc\Exception\TransportException::transportError PHP Method

transportError() public static method

public static transportError ( $error )
    public static function transportError($error)
    {
        $message = $error instanceof Exception ? $error->getMessage() : $error;
        $previous = $error instanceof Exception ? $error : null;
        return new static('Transport error occurred: ' . $message, null, $previous);
    }

Usage Example

 /**
  * @test
  */
 public function will_throw_infrastructure_exception_when_connection_error()
 {
     // given
     $username = "******";
     $password = "******";
     $this->client->shouldReceive('call')->withAnyArgs()->andThrow(TransportException::transportError("Some error"));
     // when
     $this->expectException(RepositoryInfrastructureException::class);
     $this->sut->createSessionIdByCredentials($username, $password);
 }
All Usage Examples Of fXmlRpc\Exception\TransportException::transportError
TransportException