Issue #3586299: Fix test and documentation consistency before rc1.

Description

Addresses sub-items 7.1, 7.2, and 7.4 from issue #3586299.

7.4 — Test environment documentation (tests/README.md)

Updated the test documentation with guidance for the SIMPLETEST_BASE_URL and SIMPLETEST_DB environment variables when using DDEV. This removes the need for contributors to determine these values through trial and error.

7.2 — Replace documentation-only tests

AiContextScopeGlobalTest

Replaced five placeholder assertions (assertTrue(TRUE, '...')) with real unit-level assertions that exercise plugin behavior without requiring a Drupal bootstrap:

  • supportsSubscriptions()
  • allowsMultiple()
  • isDynamic()
  • getCurrentValue()
  • buildValueForm() with $for_subscription = TRUE

AiContextItemTranslationHandlerTest

Removed this test class because it only verified PHP language features (is_subclass_of() and method_exists()) rather than module behavior. Translation handler behavior is already covered by existing Functional tests.

7.1 — Integration test process isolation

Added process isolation to test classes that were missing it by using either @runTestsInSeparateProcesses or #[RunTestsInSeparateProcesses], matching each class's existing style.

This change affects:

  • 9 Functional test classes
  • 1 FunctionalJavascript test class

Not addressed

  • 7.3 and 7.5

Checklist

  • I have updated the MR title to use format: Issue #1234: My issue title.
  • I have updated the MR description to include: Closes #1234
  • I have performed a self-review of my own code
  • I have added or updated tests, or explained in the description why this change is not covered by tests
  • I have updated documentation for any new or changed functionality
  • I have written testing instructions and verified them locally
  • I have noted any required post-merge steps (config imports, cache rebuilds, manual changes)
  • This MR contains no breaking API or hook changes, or they are explicitly documented in the description

AI Compliance

Note

Check the one that best describes your usage, or leave all unchecked if AI was not significantly used.

  • AI Assisted Code
    Mainly written by a human; AI used for autocomplete or partial generation under full human supervision.

  • AI Generated Code
    Mainly generated by AI, reviewed and approved by a human before this MR was created.

  • Vibe Coded
    Generated by AI and only functionally reviewed before this MR was created.

Closes #3586299

Edited by Pravesh Poonia

Merge request reports

Loading