Skip to content

feat(init): add test filter scripts to new extensions - #63

Merged
imorland merged 1 commit into
3.xfrom
im/test-filter-scripts
Oct 12, 2026
Merged

imorland merged 1 commit into
3.xfrom
im/test-filter-scripts

Conversation

@imorland

Copy link
Copy Markdown
Member

Fixes: no issue.

Changes proposed in this pull request:
New extensions get test:unit:filter and test:integration:filter composer scripts alongside test:unit and test:integration, so a developer can run one test class with composer test:integration:filter -- ClassName instead of the whole suite. The same scripts were added to core and every bundled extension in flarum/framework#5181. They belong to the backend testing module, so enabling it on an existing extension adds them too, and an extension without it gets neither.

Reviewers should focus on:

  • Two new init tests: the scripts are present with backend testing, and no test script is generated without it. The first failed before the change.

Screenshot
N/A

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered? (N/A)
  • For core PRs, does this need to be in core, or could it be in an extension? (N/A)
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation. (N/A, CLI.)
  • Frontend changes: tests are green (run yarn test in js/). (yarn test: 297 passed.)
  • Frontend changes: tests have been added, or are not appropriate here.
  • Backend changes: tests are green (run composer test). (N/A)
  • Backend changes: tests have been added, or are not appropriate here. (N/A)
  • Where applicable, changes are suitable for all supported database drivers (MySQL, MariaDB, PostgreSQL, SQLite). (N/A)
  • Core developer confirmed locally this works as intended.
  • The description above is written by me and describes what this pull request actually does.

The backend testing module now adds test:unit:filter and
test:integration:filter, so one test class can be run with
composer test:integration:filter -- ClassName.
@imorland
imorland merged commit dd8f958 into 3.x Oct 12, 2026
3 checks passed
@imorland
imorland deleted the im/test-filter-scripts branch October 12, 2026 11:06
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