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

Generic/AbstractClassNamePrefix: improve code coverage #641

Commits on Oct 25, 2024

  1. Generic/AbstractClassNamePrefix: rename test case file

    Doing this to be able to create tests with syntax errors in additional, separate test case files.
    rodrigoprimo authored and jrfnl committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    40daeca View commit details
    Browse the repository at this point in the history
  2. Generic/AbstractClassNamePrefix: fix up incorrect code comment

    This sniff only listens to `T_CLASS`. It does not listen to
    `T_ANON_CLASS`. So the removed code comment is incorrect. The if
    condition is still valid to bail early when live coding, but it does not
    ever apply to anonymous classes.
    rodrigoprimo authored and jrfnl committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    e95d796 View commit details
    Browse the repository at this point in the history
  3. Generic/AbstractClassNamePrefix: improve code coverage and clean up t…

    …ests
    
    Test improvements:
    * Adjust some existing tests to have comments and new lines in unexpected places.
    * Adjust some existing tests to include extended classes and implemented interfaces.
    * Add tests with `final` and `readonly` class modifier keywords.
    * Make some tests more descriptive by making the class name reflect what is being tested.
    * Add a few comments to pre-existing tests to clarify why they exist.
    * Add a separate test case file with a live coding/parse error test.
    * Remove some code snippets which weren't testing anything.
    
    Clean up the test file:
    * Remove redundant whitespace in the test case file.
    * Use proper punctuation in comments in test case file.
    rodrigoprimo authored and jrfnl committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    b80228e View commit details
    Browse the repository at this point in the history