diff --git a/.travis.yml b/.travis.yml index 6a9722ddd0..5911d5a049 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,4 +81,4 @@ script: - if [[ $XMLLINT == "1" ]]; then diff -B ./src/Standards/Squiz/ruleset.xml <(xmllint --format "./src/Standards/Squiz/ruleset.xml"); fi - if [[ $XMLLINT == "1" ]]; then diff -B ./src/Standards/Zend/ruleset.xml <(xmllint --format "./src/Standards/Zend/ruleset.xml"); fi # Run PHPStan - - if [[ $PHPSTAN == "1" ]]; then composer require --dev phpstan/phpstan && php vendor/bin/phpstan analyse --configuration=phpstan.neon; fi + - if [[ $PHPSTAN == "1" ]]; then composer require --dev phpstan/phpstan phpstan/phpstan-phpunit && php vendor/bin/phpstan analyse --configuration=phpstan.neon && php vendor/bin/phpstan analyse --configuration=phpstan.tests.neon; fi diff --git a/phpstan.tests.neon b/phpstan.tests.neon new file mode 100644 index 0000000000..040f746490 --- /dev/null +++ b/phpstan.tests.neon @@ -0,0 +1,25 @@ +parameters: + level: 1 + paths: + - tests/Core + - tests/Standards + autoload_files: + - tests/bootstrap.php + ignoreErrors: + - + count: 1 + message: '~^Method PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest::getErrorList\(\) invoked with 1 parameter, 0 required\.$~' + path: /tests/Standards/AbstractSniffUnitTest.php + - + count: 1 + message: '~^Method PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest::getWarningList\(\) invoked with 1 parameter, 0 required\.$~' + path: /tests/Standards/AbstractSniffUnitTest.php + + dynamicConstantNames: + - PHP_CODESNIFFER_IN_TESTS + - PHP_CODESNIFFER_CBF + - PHP_CODESNIFFER_VERBOSITY + +includes: + - vendor/phpstan/phpstan-phpunit/extension.neon + - vendor/phpstan/phpstan-phpunit/rules.neon