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

Add unit tests for the NewFunctions sniff. #161

Merged

Commits on Aug 13, 2016

  1. Add unit tests for the NewFunctions sniff.

    The functions in the `NewFunctions` sniff appeared not to be covered by unit tests.
    These have now been added.
    
    Also:
    * Make function name comparison case-insensitive as function calls are case-insensitive in PHP.
    * Exclude namespaced functions from this sniff (basic check).
    * Removed empty item from functions list
    * Added numerous extra functions to sniff for.
    
    Additionally some extra `noViolation` tests have been set up to make sure namespaced function calls will not be reported by this sniff.
    
    Removed the new methods which were mixed into the functions list as they can not be tested for in this way. Most cannot be called statically and if not called statically, there is little way to tell if the method belongs to that class.
    jrfnl committed Aug 13, 2016
    Configuration menu
    Copy the full SHA
    1909338 View commit details
    Browse the repository at this point in the history