wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Tests: fix incorrect file and class name

Open jrfnl opened this issue 2 years ago • 0 comments

Context

  • Code QA/consistency

Summary

This PR can be summarized in the following changelog entry:

  • Code QA/consistency

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:

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.

@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:

  • N/A No functional changes.

jrfnl avatar Dec 19 '23 00:12 jrfnl