Clean up CCC test and documentation consistency before rc1
## Problem/motivation
Follow-up to:
#3586258+s
Parent:
#3586298+s
**7. Test Quality And Test Documentation**
**Priority:** Medium
**Why group these together:** These fixes all improve test reliability and
signal. They can be split further if the test changes become large.
Includes:
- Context prefix default alignment.
- `getManageUrl()` docs update.
- Optional `hook_help()` decision/follow-up.
- `tests/README.md` environment guidance.
## Solution
### 7.1 Make integration-test process metadata consistent
**Files:**
- `tests/README.md`
- Kernel, Functional, and FunctionalJavascript test classes
**Problem:**
The module documents PHPDoc `@runTestsInSeparateProcesses` as the convention for
cross-version compatibility, but current tests use mixed styles and many
integration tests may lack either PHPDoc or PHP 8 attribute metadata.
**Recommended fix:**
- Decide on the convention while Drupal 10.5 support remains.
- Apply it consistently to all Kernel, Functional, and FunctionalJavascript
test classes.
- Once Drupal 10.5/PHPUnit 9 compatibility is dropped, consider migrating to
PHP 8 attributes in one follow-up.
### 7.2 Replace documentation-only and introspection-only tests
**Files:**
- `tests/src/Unit/AiContextScopeGlobalTest.php`
- `tests/src/Unit/AiContextItemTranslationHandlerTest.php`
- related unit tests that duplicate production logic
**Problem:**
Some tests assert `TRUE`, test only `method_exists()` / `is_subclass_of()`, or
copy production algorithms into test helpers. These tests can pass while
behavior regresses.
**Recommended fix:**
- Replace documentation-only assertions with calls to the actual methods under
test.
- Move tests to Kernel tests when real Drupal services/entities are required.
- Avoid duplicating production algorithms in test helpers.
- Keep test names intent-first.
### 7.3 Avoid functional-test dual-container traps
**File:**
- `tests/src/Functional/AiContextAdminSettingsTest.php`
**Problem:**
At least one functional test submits a form directly through the test
container's `form_builder`. Functional tests run separate test and web-server
containers, so direct form builder submission can miss browser/runtime behavior.
**Recommended fix:**
- Use `$this->drupalGet()` and browser-level `$this->submitForm()` when testing
user-facing forms.
- If direct form API testing is intentional, move that coverage to a Kernel test
or document why direct submission is appropriate.
### 7.4 Add missing test environment guidance to `tests/README.md`
**Files:**
- `tests/README.md`
- optionally `docs/contribute/testing.md`
**Problem:**
`docs/contribute/testing.md` documents `SIMPLETEST_BASE_URL` and
`SIMPLETEST_DB`, but `tests/README.md` does not. Developers following only the
test README can hit setup failures.
**Recommended fix:**
- Add the DDEV `SIMPLETEST_BASE_URL` and `SIMPLETEST_DB` values to
`tests/README.md`.
- Or link directly from `tests/README.md` to `docs/contribute/testing.md`.
### 7.5 Add basic accessibility test coverage
**Files:**
- FunctionalJavascript tests or a focused accessibility test suite
**Problem:**
No accessibility or axe-style assertions were found in the test suite.
**Recommended fix:**
- Add focused coverage for the pages changed by the accessibility fixes:
context item list, agents overview, and overview page.
- At minimum, test `Drupal.announce()` behavior for filters and visible labels
for tooltip/truncated content.
## AI usage
- [x] AI assisted issue
issue