Skip to content

Commit

Permalink
Tests: set validUnusedVariableNames for testUnusedParams
Browse files Browse the repository at this point in the history
  • Loading branch information
sirbrillig committed Feb 7, 2018
1 parent 20ac738 commit 2e59460
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions VariableAnalysis/Tests/CodeAnalysis/VariableAnalysisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ public function testTraitAllowsThis() {
public function testUnusedParams() {
$fixtureFile = $this->getFixture('FunctionWithUnusedParamsFixture.php');
$phpcsFile = $this->prepareLocalFileForSniffs($this->getSniffFiles(), $fixtureFile);
$phpcsFile->ruleset->setSniffProperty(
'VariableAnalysis\Sniffs\CodeAnalysis\VariableAnalysisSniff',
'validUnusedVariableNames',
'ignored'
);
$phpcsFile->process();
$lines = $this->getWarningLineNumbersFromFile($phpcsFile);
$expectedWarnings = [
Expand Down

0 comments on commit 2e59460

Please sign in to comment.