Skip to content

Fix Backend tests failing on wip/1.3 - #1586

Merged
LukeTowers merged 1 commit into
wintercms:wip/1.3from
austinderrick:fix/wip-1.3-backend-tests
Oct 30, 2026
Merged

LukeTowers merged 1 commit into
wintercms:wip/1.3from
austinderrick:fix/wip-1.3-backend-tests

Conversation

@austinderrick

Copy link
Copy Markdown
Contributor

Summary

The Backend tests that came into wip/1.3 with the latest merge from develop fail there (10 errors, 3 failures), so every PR against wip/1.3 is red. This changes only test files.

  • Non-static data providers (10 errors): the PHPUnit version on wip/1.3 requires data providers to be static. Eight providers in EditorSettingTest, BackendMarkupEscapingTest and ReportContainerSecurityTest were not.
  • Refusal messages (3 failures): refusalMessage() in InspectableContainerSecurityTest and ReportContainerSecurityTest read the message from the error page's <title>. On Laravel 13 that title is the app name ("Winter CMS"), so the helpers now read $response->exception->getMessage() instead. That does not depend on debug mode, so the two Config::set('app.debug', true) lines that existed only for the error page are removed.

Testing

php artisan winter:test passes locally for Backend (517 tests, up from 467 because the provider cases now run), System (383) and CMS (221).

Make the data providers static, as the PHPUnit version on wip/1.3 requires, and read refusal messages from the response's exception rather than the error page title, which Laravel 13 sets to the app name.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6655bb3d-9da6-431b-8e8f-2b0ea7285492

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@LukeTowers
LukeTowers merged commit 4bb2841 into wintercms:wip/1.3 Oct 30, 2026
13 checks passed
@austinderrick
austinderrick deleted the fix/wip-1.3-backend-tests branch October 30, 2026 17:00
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.

2 participants