Skip to content

Commit

Permalink
Merge pull request #585 from Automattic/fix/unit-test-failure
Browse files Browse the repository at this point in the history
Hooks/AlwaysReturnInFilter: adjust expectations for a test
  • Loading branch information
GaryJones authored Sep 24, 2020
2 parents 261cb4a + 09f3700 commit 334b395
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class tokenizer_bug_test {
add_filter( 'tokenizer_bug', [ $this, 'tokenizer_bug' ] );
}

public function tokenizer_bug( $param ): namespace\Foo {} // Ok (tokenizer bug in PHPCS < 3.5.7/3.6.0).
public function tokenizer_bug( $param ): namespace\Foo {} // Ok (tokenizer bug PHPCS < 3.5.7) / Error in PHPCS >= 3.5.7.
}

// Intentional parse error. This has to be the last test in the file!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

namespace WordPressVIPMinimum\Tests\Hooks;

use PHP_CodeSniffer\Config;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;

/**
* Unit test class for the Hooks/AlwaysReturn sniff.
*
Expand All @@ -31,6 +33,7 @@ public function getErrorList() {
105 => 1,
129 => 1,
163 => 1,
188 => version_compare( Config::VERSION, '3.5.7', '>=' ) ? 1 : 0,
];
}

Expand Down

0 comments on commit 334b395

Please sign in to comment.