Closed (fixed)
Project:
Index Now
Version:
4.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
30 Apr 2026 at 12:38 UTC
Updated:
30 Apr 2026 at 14:07 UTC
Jump to comment: Most recent
IndexNowPathProcessor and IndexNowOutboundPathProcessor
have no dedicated unit tests. Both are only exercised indirectly through kernel
tests, which leaves their core logic unverified in isolation:
IndexNowPathProcessor::processInbound() rewrites the public/{key}.txt path to the internal/index_now_api_key/{key} route. The guard conditions (emptyIndexNowOutboundPathProcessor::processOutbound() overrides$options['base_url'] when the index_now optionindex_now.base_url setting are both present. The
Add tests/src/Unit/PathProcessor/IndexNowPathProcessorTest.php
covering:
Add tests/src/Unit/PathProcessor/IndexNowOutboundPathProcessorTest.php
covering:
base_url is overridden when both the index_nowindex_now.base_url setting are set.
base_url is left unchanged when the index_nowbase_url is left unchanged when absolute is notbase_url is left unchanged when index_now.base_url
All dependencies (IndexNowKeyManagerInterface,
Settings) should be mocked or stubbed. No Drupal bootstrap is
required.
IndexNowPathProcessorTest.phpIndexNowOutboundPathProcessorTest.phpNone.
None.
None.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
macsim commentedComment #6
macsim commented