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

Tests: add abstract NonSniffTestCase class #328

Merged
merged 1 commit into from
Nov 4, 2023

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Nov 4, 2023

... for tests which are directly not related to sniffs, nor need a code sample, but which do need a functioning PHPCS File object, for instance to mock retrieve the file name from the File object or mock retrieve a base path from the Config object within the File object.

Note: this test case will likely be moved to PHPCSUtils at some point in the future, though it may be a while as in its current set up, the class needs a PHP 7.0 minimum.

Note: this base class is needed for some tests which will be added in subsequent PRs.

... for tests which are directly not related to sniffs, nor need a code sample, but which do need a functioning PHPCS File object, for instance to mock retrieve the file name from the File object or mock retrieve a base path from the Config object within the File object.

Note: this test case will likely be moved to PHPCSUtils at some point in the future, though it may be a while as in its current set up, the class needs a PHP 7.0 minimum.
@coveralls
Copy link

Coverage Status

coverage: 97.146%. remained the same
when pulling e583a59 on JRF/yoastcs-tests-add-nonsnifftestcase
into 06cf5d2 on develop.

@jrfnl jrfnl merged commit 4630432 into develop Nov 4, 2023
25 checks passed
@jrfnl jrfnl deleted the JRF/yoastcs-tests-add-nonsnifftestcase branch November 4, 2023 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants