Table of Contents

tests/unit/GenerateRequestTest.php

Source: tests/unit/GenerateRequestTest.php · 162 lines, ~985 statements · namespace: (global) · `declare(strict_types=1)`: no


Generate Request Utility Test

Tests for generate_request() function that builds HTTP query strings for CRUD functionality in admin pages.

Imports

Alias Fully-qualified name
TestCase PHPUnit\Framework\TestCase

Includes

Mode Target Line
require require_once DIR . '/../../lib/utility/sanitize-urls.php'; 42
require require_once DIR . '/../../lib/utility/generate-request.php'; 43

Functions (3)

Function Line Params Returns Summary
check_request_generated 20 0
escape_html 28 4
build_query 36 2

check_request_generated()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function check_request_generated()

escape_html()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function escape_html($input, $type = 'html', $encoding = 'utf-8', $mode = 'base')
Parameter Type Default Description
$input (untyped) required
$type (untyped) 'html'
$encoding (untyped) 'utf-8'
$mode (untyped) 'base'

build_query()

Declared inside a guard (the project uses `if (!function_exists(…))` around global functions), so the declaration is conditional at load time.

public function build_query($base, $query_data)
Parameter Type Default Description
$base (untyped) required
$query_data (untyped) required

Types declared here


Generated by 'tools/gendoc'.