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

UtilityMethodTestCase: fail test on missing test marker comment #273

Commits on May 29, 2021

  1. UtilityMethodTestCase: fail test on missing test marker comment

    When a test marker comment was not found, the `UtilityMethodTestCase::getTargetToken()` would search for the target token between the start of the file and the first test marker it _did_ find.
    
    This could lead to the wrong token being set as the `$stackPtr` for a test.
    
    This improves the `UtilityMethodTestCase::getTargetToken()` method by failing the test when the test marker comment cannot be found.
    
    The `$failTest` parameter to throw an exception instead of failing the test is not taken into account as when the test marker comment cannot be found, the correct test target can never be found, no matter what token types or content is passed.
    
    Includes unit test.
    jrfnl committed May 29, 2021
    Configuration menu
    Copy the full SHA
    9b8cf60 View commit details
    Browse the repository at this point in the history