public static function mock(array $stack = []): ApiClient
    {
        $mock = new MockHandler($stack);

        $handler = HandlerStack::create($mock);

        $client = new Client(['handler' => $handler, 'verify' => false]);

        app()->instance('ej:sdk:guzzle', $client);

        return resolve(__CLASS__);
    }
public static function mock(array $stack = []): ApiClient
    {
        $mock = new MockHandler($stack);

        $handler = HandlerStack::create($mock);

        $client = new Client(['handler' => $handler, 'verify' => false]);

        app()->instance('ej:sdk:guzzle', $client);

        return resolve(__CLASS__);
    }
public static function mock ( array $ stack = [ ] ) : ApiClient { $ mock = new MockHandler ( $ stack ) ; $ handler = HandlerStack :: create ( $ mock ) ; $ client = new Client ( [ 'handler' => $ handler , 'verify' => false ] ) ; app ( ) -> instance ( 'ej:sdk:guzzle' , $ client ) ; return resolve ( __CLASS__ ) ; }
Mocks a response stack into the api client

@param array $stack
@return ApiClient
Mocks a response stack into the api client