Table of Contents

tests/unit/ThemeSearchUrlTest.php

Source: tests/unit/ThemeSearchUrlTest.php · 133 lines, ~344 statements · namespace: (global) · `declare(strict_types=1)`: no


ThemeSearchUrlTest

Unit tests for the theme_search_url() helper in public/themes/blog/functions-post.php.

theme_search_url() returns the search page URL honoring the active permalink scheme: {base}/search when permalinks are ON, {base}/ (so the form submits ?q=) when OFF. The helper is memoized with a static variable and depends on app_url()/is_permalink_enabled(), which read the database — so each mode is exercised in a fresh PHP subprocess with stubbed globals (same isolation pattern as TastybitesFunctionsTest).

Imports

Alias Fully-qualified name
TestCase PHPUnit\Framework\TestCase

Types declared here


Generated by 'tools/gendoc'.