Skip to content

Give the missing-image test a language string - #11

Merged
bonelifer merged 1 commit into
mainfrom
fix-image-missing-test-deprecation
Oct 6, 2026
Merged

bonelifer merged 1 commit into
mainfrom
fix-image-missing-test-deprecation

Conversation

@bonelifer

Copy link
Copy Markdown
Contributor

Summary

  • test_missing_image_preserves_its_alt_description used an unconfigured language mock that returns null, so DOMDocument::createTextNode() raised a "Passing null to parameter Add optional split navigation links for docs vs. developer docs #1" deprecation notice on every test run.
  • The mock now returns the language key, and the test also checks the notice text. Test-only change; the extension code is unchanged, since phpBB's real language::lang() always returns a string.

Testing

  • Claude ran PHPUnit 9.6 against phpBB 3.3.19 and phpBB 4.0 (master): 104 tests pass on both, none skipped, and the notice no longer appears.

Investigated and written by Claude on behalf of William Jacoby (bonelifer).

The unconfigured language mock returned null, so DOMDocument::createTextNode() raised a deprecation notice in every test run. The mock now returns the language key, and the test checks the notice text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit a251ce1 into main Oct 6, 2026
7 checks passed
@bonelifer
bonelifer deleted the fix-image-missing-test-deprecation branch October 6, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant