///
import { Injector } from "../injector/injector";
import { IModule } from "../interfaces/imodule";
import { IProvider } from "../interfaces/iprovider";
export interface IFakeServerConfig {
}
/**
* @since 1.0.0
* @function
* @name fakeHttpServer
* @param {Function} Class httpServer class
* @param {IFakeServerConfig} config fakeHttpServer config
* @returns {Injector}
*
* @description
* Use fakeHttpServer for testing only
*/
export declare function fakeHttpServer(Class: Function, config?: IFakeServerConfig): FakeServerApi;
/**
* @since 1.0.0
* @function
* @name fakeControllerActionCall
* @param {Injector} injector
* @param {Function | IProvider} controller
* @param {String} action name to fire action
* @param {Object} params
* @param {Object} headers
*
* @returns {Promise}
*
* @description
* Use fakeControllerCall for testing only
*/
export declare function fakeControllerActionCall(injector: Injector, controller: Function | IProvider, action: string, params?: Object, headers?: Object): Promise;
/**
* @since 1.0.0
* @class
* @name FakeResponseApi
* @constructor
* @description
* FakeResponseApi api
*
* @private
*/
export interface FakeResponseApi {
getStatusCode(): number;
getBody(): string | Buffer;
getHeaders(): any;
}
/**
* @since 1.0.0
* @class
* @name FakeServerApi
* @constructor
* @description
* Get a FakeServerApi to do serverside requests
*
* @private
*/
export declare class FakeServerApi {
private modules;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#getModules
* @description
* Get initialized modules
*/
getModules(): Array;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#GET
* @description
* Fire GET Method
*/
GET(url: string, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#OPTIONS
* @description
* Fire OPTIONS Method
*/
OPTIONS(url: string, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#HEAD
* @description
* Fire HEAD Method
*/
HEAD(url: string, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#DELETE
* @description
* Fire DELETE Method
*/
DELETE(url: string, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#TRACE
* @description
* Fire TRACE Method
*/
TRACE(url: string, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#CONNECT
* @description
* Fire CONNECT Method
*/
CONNECT(url: string, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#POST
* @description
* Fire POST Method
*/
POST(url: string, data?: string | Buffer, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#PUT
* @description
* Fire PUT Method
*/
PUT(url: string, data?: string | Buffer, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#PATCH
* @description
* Fire PATCH Method
*/
PATCH(url: string, data?: string | Buffer, headers?: Object): Promise;
/**
* @since 1.0.0
* @function
* @name FakeServerApi#request
* @private
* @description
* Fire request
*/
private request(request, response);
}