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: fix incorrect file and class name #20973
Merged
Merged
Conversation
This file contains 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
jrfnl
added
yoast cs/qa
changelog: non-user-facing
Needs to be included in the 'Non-userfacing' category in the changelog
labels
Dec 19, 2023
jrfnl
force-pushed
the
JRF/tests/fix-file-class-name
branch
from
December 19, 2023 00:25
900abdd
to
8bf03d4
Compare
jrfnl
force-pushed
the
JRF/tests/fix-file-class-name
branch
from
December 19, 2023 07:25
8bf03d4
to
686387c
Compare
jrfnl
force-pushed
the
JRF/tests/fix-file-class-name
branch
2 times, most recently
from
April 7, 2024 17:53
41353d1
to
19bf6c1
Compare
The test class wasn't running due to the incorrect file name (missing `Test`). Now the tests are being run, the tests were failing. The first issue is fixed via fixing a typo in a property reference (x2). However, there is a second issue: ``` 1) Yoast\WP\SEO\Tests\Unit\Inc\Sitemaps\Sitemaps_Router_Test::test_template_redirect_exit Mockery\Exception\InvalidCountException: Method home_url(<Any Arguments>) from Mockery_1 should be called exactly 1 times but called 2 times. path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/CountValidator\Exact.php:38 path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/Expectation.php:310 path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php:119 path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/Container.php:301 path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/Container.php:286 path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/mockery/library/Mockery.php:210 path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/Adapter\Phpunit\MockeryPHPUnitIntegration.php:74 path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/Adapter\Phpunit\MockeryPHPUnitIntegration.php:49 path/to/wordpress-seo/vendor/mockery/mockery/library/Mockery/Adapter\Phpunit\MockeryPHPUnitIntegrationAssertPostConditionsForV8.php:29 C:\bin\phars\phpunit-9.6.15.phar:2326 ``` Obviously, I can adjust the expectation, but I believe it should be checked that updating the expectation is actually the right course of action.
jrfnl
force-pushed
the
JRF/tests/fix-file-class-name
branch
from
April 7, 2024 17:55
19bf6c1
to
b78b58f
Compare
@vraja-pro I've rebased this PR. Could you have a look when you have the chance ? |
Fixed the test and other then that CR ✅ |
Pull Request Test Coverage Report for Build da4920c65fa45f4e48638266e826df97464e3bddWarning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changelog: non-user-facing
Needs to be included in the 'Non-userfacing' category in the changelog
yoast cs/qa
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.
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
The test class wasn't running due to the incorrect file name (missing
Test
). Now the tests are being run, the tests were failing.The first issue is fixed via fixing a typo in a property reference (x2).
However, there is a second issue:
Obviously, I can adjust the expectation, but I believe it should be checked that updating the expectation is actually the right course of action.
@vraja-pro Could you please have a look at this ?
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps: