Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test suite #17

Merged
merged 1 commit into from
Jan 6, 2024
Merged

Fix test suite #17

merged 1 commit into from
Jan 6, 2024

Conversation

iMattPro
Copy link
Contributor

@iMattPro iMattPro commented Jan 6, 2024

No description provided.

Signed-off-by: Matt Friedman <[email protected]>
Comment on lines 28 to 29
<directory suffix=".php">./language/</directory>
<directory suffix=".php">./migrations/</directory>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't process these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because these files are outside the scope of what we are actually unit-testing (they still get used during tests, but PhpUnit won't load/scan them during its initialization). There's nothing to test directly in the language or migration folders, as they are just data arrays. And we can't test the tests - I mean the tests test themselves just by being run, lol.

The vendor folder has to be excluded too, otherwise it causes fatal errors by trying to redeclare the autoload class (it was already declared in phpBB's vendor dir). This error pops up during unit-testing with code coverage, but not testing w/o code coverage. But same thing applies here, we're not unit-testing anything in the vendor dir since that's all 3rd party software and someone else's job to test, lol.

Copy link
Contributor

@rxu rxu Jan 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, what I've wondered about is just migration and language folders as they contain code at least to lint etc. :)
Okay.

@iMattPro iMattPro merged commit 931681d into phpbb-extensions:main Jan 6, 2024
31 checks passed
@iMattPro iMattPro deleted the fixes branch January 6, 2024 17:07
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