Assert that a 200 status code was returned from the last call.

@param  string $uri
@param  string $message
@throws PHPUnitException
@return void
552372
protected function assertPageLoaded($uri, $message = null)
    {
        $status = $this->statusCode();

        try {
            $this->assertEquals(200, $status);
        } catch (PHPUnitException $e) {
            $message = $message ?: "A GET request to '{$uri}' failed. Got a {$status} code instead.";

            $this->logLatestContent();

            if (method_exists($this, 'handleInternalError')) {
                $this->handleInternalError($message);
            }

            throw new PHPUnitException($message);
        }
    }
668669
private function uriSafeEncode($message)
    {
        $encoded = base64_encode($message);
        $uriSafe = str_replace(['+', '/'], ['-', '_'], $encoded);

        return rtrim($uriSafe, '=');
    }
979576
public static void checkUri(String uri, String message, Object... args) {
    try {
      new URI(uri);
    } catch (URISyntaxException e) {
      throw new IllegalArgumentException(String.format(message, args), e);
    }
  }
176330
public function status(string $message, string $status, string $decorateStyle = 'info', string $decorate = '*')
    {
        $this->output->writeln(
            sprintf(
                ' <%s>%s</> %s %s',
                $decorateStyle,
                $decorate,
                str_pad($message, 36),
                $status
            )
        );
    }
393920
private function setStatus($status, $message = '')
    {
        if ($status > $this->status) {
            $this->status = $status;
            // Save the message belonging to this worse state.
            if (!empty($message)) {
                $this->statusMessage = $message;
            }
        }
    }
999914
private function debug($message)
    {
        if (1 < func_num_args()) {
            $message = call_user_func_array('sprintf', func_get_args());
        }
        $this->logger->addDebug($message);
    }
892805
public function log($message)
    {
        $formattedMessage = $this->formatMessage($message);
        if (!empty($formattedMessage)) {
            $this->logger->info($formattedMessage);
        }
    }
390193
public function errors(int $statusCode, string $message, $errors = null): void
    {
        $this->setStatusCode($statusCode);
        $this->setMessage($message);
        $this->setErrors($errors);

        throw new ApiException($this);
    }
170686
public function respondUnauthorized($message = null): JsonResponse
    {
        return $this->setStatusCode(IlluminateResponse::HTTP_UNAUTHORIZED)
            ->respondWithError(ApiResponse::CODE_NOT_AUTHORIZED, $message);
    }
636846
public function error(string $message)
    {
        $this->relay->send(
            $message,
            Relay::PAYLOAD_CONTROL | Relay::PAYLOAD_RAW | Relay::PAYLOAD_ERROR
        );
    }
1053349
public function assertPageIs($uri, $message, $negate = false)
    {
        $this->assertPageLoaded($uri = $this->prepareUrl($uri));

        $method = $negate ? 'assertNotEquals' : 'assertEquals';

        $this->$method($uri, $this->currentPage(), $message);

        return $this;
    }
600841
public function setStatusCode($code, $message)
  {
    $this->meta->statusCode = $code;
    $this->meta->statusMessage = $message;
  }
71366
protected function success($message)
    {
        if ($this->isVerbose() === true) {
            $this->out("%g${message}%n", true);
        }
        
        exit(self::EXIT_SUCCESS);
    }
217976
public function markAsDisappeared($message = null)
    {
        if (!is_null($message)) {
            $this->setMessages($message);
        }
        $this
            ->setStatus(self::STATUS_DISAPPEARED)
            ->setFinishedAt($this->getLastSeen())
            ->save();

        $this->log(sprintf('Job "%s" (id: %s) disappeared. Message: %s', $this->getJobCode(), $this->getId(), $message));
    }
1008115
protected function log($message): void
    {
        if ($this->logger !== null) {
            $this->logger->log($message);
        }
    }
356648
public function error($message,$url='',$wait=3){
        $url=is_null($url) || $url=='' ? 'javascript:history.back(-1)' : $url;
        if($this->instance->isTemplateFile('error')){
            $this->instance->assign(['status'=>false,'message'=>$message,'url'=>url($url),'wait'=>$wait]);
            echo $this->instance->render('error');
            exit;
        }else{
            $status=false;
            require CORE_PATH.'tpl/jump.php';
            exit;
        }
    }
684602
public static function respond($status = 404, $message = '') {
        http_response_code($status);
        if (Request::isAjaxRequest()) {
            @header('ajax: 1');
            Response::getInstance()->output(['message' => $message ? $message : __('error occurred')]);
            Response::getInstance()->close();
        } else {
            if ($status == 404) {
                $data ['message'] = $message;
                $view             = template('404.tpl', $data);
            } else if ($status == 403) {
                $data ['message'] = $message;
                $view             = template('403.tpl', $data);
            } else if ($status == 500) {
                $data ['message'] = $message;
                $view             = template('500.tpl', $data);
            } else if ($status == 503) {
                $data ['message'] = $message;
                $view             = template('503.tpl', $data);
            } else if ($message) {
                if (is_array($message)) {
                    $view = new JsonView($message);
                } else {
                    $view = new SimpleView($message);
                }
            } else {
                $view = null;
            }
            if ($view) {
                Response::getInstance()->output($view);
                Response::getInstance()->close();
            }
        }
        exit (1);
    }