This repository was archived by the owner on May 29, 2026. It is now read-only.
fix: PHPUnit drift in SettingsControllerTest and 5 PHPCS errors#295
Merged
rubenvdlinde merged 1 commit intoMay 27, 2026
Merged
Conversation
… fix PHPCS errors SettingsController was refactored to use #[AuthorizedAdminSetting] for admin enforcement (removing IGroupManager from the constructor), but SettingsControllerTest still passed a groupManager named arg that no longer exists, causing 7 setUp errors. Update the test to match the current constructor signature and remove tests for controller-level admin checks that are now handled by the framework attribute. Also fix 5 PHPCS errors: rewrite 3 inline ternary IFs in DecideskToolProvider as multi-line if/else blocks, auto-fix alignment in VotingBehaviourController, and remove a trailing blank line in WorkspaceService.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
SettingsControllerTest::setUp()passed agroupManager:named argument that no longer exists inSettingsController::__construct(). The controller was refactored to use#[AuthorizedAdminSetting]for admin enforcement, removingIGroupManagerfrom the constructor. Updated the test to match the current 3-arg signature and removed 4 tests that asserted controller-level admin checks now handled by the framework attribute. 176 tests, 0 errors, 37 skipped (environment-dependent).lib/Mcp/DecideskToolProvider.php: 3× "Inline IF statements not allowed" — rewritten as multi-line if/else blockslib/Controller/VotingBehaviourController.php: alignment error — auto-fixed via phpcbflib/Service/WorkspaceService.php: trailing blank line after function — auto-fixed via phpcbfTest plan
composer test:unit→ 176 tests, 0 errors, 37 skippedcomposer phpcs→ 0 errors (1 pre-existing warning on PreferencesController, out of scope)