GuzzleHttp\Tests\Server::flush PHP Method

flush() public static method

Flush the received requests from the server
public static flush ( )
    public static function flush()
    {
        return self::getClient()->request('DELETE', 'guzzle-server/requests');
    }

Usage Example

Exemplo n.º 1
0
 public function testStripsFragmentFromHost()
 {
     Server::flush();
     Server::enqueue("HTTP/1.1 200 OK\r\n\r\nContent-Length: 0\r\n\r\n");
     // This will fail if the removal of the #fragment is not performed
     $url = Url::fromString(Server::$url)->setPath(null)->setFragment('foo');
     $client = new Client();
     $client->get($url);
 }
All Usage Examples Of GuzzleHttp\Tests\Server::flush