Illuminate\Foundation\Testing\Concerns\InteractsWithPages::assertPageLoaded PHP Метод

assertPageLoaded() защищенный Метод

Assert that a given page successfully loaded.
protected assertPageLoaded ( string $uri, string | null $message = null )
$uri string
$message string | null
    protected function assertPageLoaded($uri, $message = null)
    {
        $status = $this->response->getStatusCode();
        try {
            $this->assertEquals(200, $status);
        } catch (PHPUnitException $e) {
            $message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";
            $responseException = isset($this->response->exception) ? $this->response->exception : null;
            throw new HttpException($message, null, $responseException);
        }
        return $this;
    }