Add regression test coverage for RestrictToTopic topic matching
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3580095. --> Reported by: [harivansh](https://www.drupal.org/user/3678656) >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Short Description: </strong>[One-line issue summary for stakeholders]<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Add regression test coverage for RestrictToTopic::processInput() topic matching.<br> The parent issue fixed case-insensitive topic matching for LLM output and also handled the edge case where valid and invalid topics differ only by case. This behavior should be<br> covered by an automated test to prevent regressions.</p> <h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4> <p>See parent issue: <a href="https://www.drupal.org/project/ai/issues/3579079">https://www.drupal.org/project/ai/issues/3579079</a></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add a focused test covering:<br> - case-insensitive topic matching<br> - exact-case precedence<br> - ambiguous valid/invalid topics that differ only by case</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>- Add the test<br> - Run the relevant PHPUnit coverage</p> <h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3> <p>No functional changes. Test coverage only.</p> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[x] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.<br> [ ] AI Assisted Code</p> <p>[ ] AI Generated Code</p> <p>[ ] Vibe Coded</p> <p>If you want, I can make it even shorter and more Drupal-issue-queue style.</p> > Related issue: [Issue #3579079](https://www.drupal.org/node/3579079)
issue