Repository navigation
test: boot integration tests through core's test bootstrap - #572
Merged
Merged
Conversation
phpunit.integration.xml loaded lib/base.php directly, without PHPUNIT_RUN, so core installed its production OC\Log\ErrorHandler. PHPUnit's own handler then backed off, and every PHP notice and warning in the integration suite went to owncloud.log while the tests stayed green. CI runs this suite (do-integration-tests: true), and a planted E_USER_WARNING passed it. Use core's tests/bootstrap.php, as phpunit.xml already does. It defines PHPUNIT_RUN and loads the enabled apps. The planted warning now fails the test, and the current suite stays green. PHPUnit 9 still fails on deprecations only with convertDeprecationsToExceptions="true", which this config does not set. Refs owncloud/core#41904 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
Contributor
Author
jvillafanez
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
phpunit.integration.xmlboots withbootstrap="../../lib/base.php", soPHPUNIT_RUNis never defined. Core therefore installs its productionOC\Log\ErrorHandler, and PHPUnit 9's own handler backs off. Every PHP notice and warning raised in the integration suite goes toowncloud.log, and the suite stays green. CI runs this suite (do-integration-tests: true→make test-php-integration). See owncloud/core#41904.This PR switches the bootstrap to core's
tests/bootstrap.php, asphpunit.xmlalready does. That file definesPHPUNIT_RUNand loads the enabled apps.Verified on oC 11 (
owncloudci/php:8.3) with anE_USER_WARNINGplanted inNotesControllerTest::testUpdate:"app":"PHP"entries in owncloud.logOK (2 tests)foreach() … null givenwarnings fromapps/dav/lib/HookManager.php#121/#126Errors: 1(PLANTED-41904)Without the plant, the suite is green after the change on two consecutive runs. The HookManager warnings didn't recur under core's bootstrap.
PHPUnit 9 still fails on deprecations only with
convertDeprecationsToExceptions="true", which this config doesn't set. This PR leaves the rest of the config alone (pre-9.3 schema, nofailOnWarning).🤖 Generated with Claude Code