Documentation

ExplainTest extends TestCase
in package

FinalYes

Test the Ruleset::explain() function.

Tags
covers

Table of Contents

Methods

testExplain()  : void
Test the output of the "explain" command.
testExplainAlwaysDisplaysCompleteSniffName()  : void
Test the output of the "explain" command is not influenced by a user set report width.
testExplainCustomRuleset()  : void
Test that "explain" works correctly with custom rulesets.
testExplainSingleSniff()  : void
Test the output of the "explain" command when a ruleset only contains a single sniff.
testExplainWillExplainEachStandardSeparately()  : void
Test that each standard passed on the command-line is explained separately.
testExplainWithDeprecatedSniffs()  : void
Test the output of the "explain" command for a standard containing both deprecated and non-deprecated sniffs.

Methods

testExplain()

Test the output of the "explain" command.

public testExplain() : void

testExplainAlwaysDisplaysCompleteSniffName()

Test the output of the "explain" command is not influenced by a user set report width.

public testExplainAlwaysDisplaysCompleteSniffName() : void

testExplainCustomRuleset()

Test that "explain" works correctly with custom rulesets.

public testExplainCustomRuleset() : void

Verifies that:

  • The "standard" name is taken from the custom ruleset.
  • Any and all sniff additions and exclusions in the ruleset are taken into account correctly.
  • That the displayed list will have both the standards as well as the sniff names ordered alphabetically.

testExplainSingleSniff()

Test the output of the "explain" command when a ruleset only contains a single sniff.

public testExplainSingleSniff() : void

This is mostly about making sure that the summary line uses the correct grammar.

testExplainWillExplainEachStandardSeparately()

Test that each standard passed on the command-line is explained separately.

public testExplainWillExplainEachStandardSeparately() : void
Tags
covers

testExplainWithDeprecatedSniffs()

Test the output of the "explain" command for a standard containing both deprecated and non-deprecated sniffs.

public testExplainWithDeprecatedSniffs() : void

Tests that:

  • Deprecated sniffs are marked with an asterix in the list.
  • A footnote is displayed explaining the asterix.
  • And that the "standard uses # deprecated sniffs" listing is not displayed.

        
On this page

Search results