Skip to content

Tests: add missing .fixed files #299

Closed
@jrfnl

Description

@jrfnl

There are currently five test case files for which the associated sniff would make fixes, but which do not have a corresponding .fixed file version of the test case file to verify that the fixes made are correct.

Two of these are for JS/CSS tests. I'm not concerned about those as support for this will be dropped in 4.0 anyway.

However, for the other three, a .fixed file should be added and it should be carefully verified that the fixes made by the sniff are actually correct as this hasn't been safeguarded over time.

To verify the fixes, one will need to scrutinize what the sniff actually does + one would likely need to dig into the file history to see when those tests were added and in relation to what issue(s).

Note: a possible conclusion from this exercise could be that there is a bug in one or more of the sniffs and fixes are being made where they shouldn't be made. If that's the case, the sniff would need to be fixed instead.

1) PHP_CodeSniffer\Standards\PEAR\Tests\WhiteSpace\ScopeIndentUnitTest::testSniff
Missing fixed version of ScopeIndentUnitTest.inc to verify the accuracy of fixes, while the sniff is making fixes against the test case file

2) PHP_CodeSniffer\Standards\PSR2\Tests\Namespaces\UseDeclarationUnitTest::testSniff
Missing fixed version of UseDeclarationUnitTest.17.inc to verify the accuracy of fixes, while the sniff is making fixes against the test case file

3) PHP_CodeSniffer\Standards\Squiz\Tests\Commenting\ClosingDeclarationCommentUnitTest::testSniff
Missing fixed version of ClosingDeclarationCommentUnitTest.inc to verify the accuracy of fixes, while the sniff is making fixes against the test case file

For completeness, these are the other two missing ones. These do not need to be addressed.

4) PHP_CodeSniffer\Standards\Squiz\Tests\ControlStructures\SwitchDeclarationUnitTest::testSniff
Missing fixed version of SwitchDeclarationUnitTest.js to verify the accuracy of fixes, while the sniff is making fixes against the test case file

5) PHP_CodeSniffer\Standards\Squiz\Tests\CSS\LowercaseStyleDefinitionUnitTest::testSniff
Missing fixed version of LowercaseStyleDefinitionUnitTest.css to verify the accuracy of fixes, while the sniff is making fixes against the test case file

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions