TestMultipleHttpKernel example

return $values;
    }

    // A basic response with 200 status code and a tiny body.     public function setNextResponse($statusCode = 200, array $headers = []$body = 'Hello World', \Closure $customizer = null, EventDispatcher $eventDispatcher = null)
    {
        $this->kernel = new TestHttpKernel($body$statusCode$headers$customizer$eventDispatcher);
    }

    public function setNextResponses($responses)
    {
        $this->kernel = new TestMultipleHttpKernel($responses);
    }

    public function catchExceptions($catch = true)
    {
        $this->catch = $catch;
    }

    public static function clearDirectory($directory)
    {
        if (!is_dir($directory)) {
            return;
        }
Home | Imprint | This part of the site doesn't use cookies.