Issue Task Resolved

#110724Avoid PHPUnit notices from mocks without expectations

Wouter Wolters 09/16/26, 16:09 updated 09/19/26, 09:15

Description

Several core tests create PHPUnit mock objects without configuring
expectations.

The imaging tests only need access to a protected helper, while the text
extractor tests only configure return values. PHPUnit therefore reports
four notices because these objects are not being used as mocks.

These notices cause otherwise successful unit and functional suites to
finish with “OK, but there were issues” and make newly introduced notices
harder to identify.

Invoke the protected imaging helper without creating a mock and use test
stubs for the text extractor file objects.

Reviews 1

History 12

  1. Wouter Wolters commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-19T09:15:09+00:00" > 09/19/26, 09:15 </span>

    Applied in changeset commit:0ed758881020dde9ee594d9e864deb14a2a39fc7.