While the tests are fine when using phpcs < 3.3.0, they will fail when using phpcs >= 3.3.0:
PHPUnit 6.5.13-32-g6050504ca by Sebastian Bergmann and contributors.
............F........ 21 / 21 (100%)
Time: 430 ms, Memory: 8.00MB
There was 1 failure:
1) Symfony\Tests\Functions\ReturnTypeUnitTest::testSniff
[LINE 5] Expected 1 error(s) in ReturnTypeUnitTest.inc but found 0 error(s).
[LINE 21] Expected 1 error(s) in ReturnTypeUnitTest.inc but found 0 error(s).
While the tests are fine when using phpcs < 3.3.0, they will fail when using phpcs >= 3.3.0:
The reason is that the constant
T_RETURN_TYPE
used inReturnTypeUnitSniff
is deprecated. For more details, see https://github.com/squizlabs/PHP_CodeSniffer/blob/master/package.xml#L2158