You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in Magento2/Tests/Files/LineLengthUnitTest.inc, add this line:
$test = "If a string exceeds 120 characters and a part of the string is Phrase('xy'), this would not be caught by the regular expression because it matches any line containing Phrase('xy') or __('xy').";
Run vendor/bin/phpunit
Expected result
An error as the line contains no translation but only the keywords "Phrase" and "__" inside a string, e.g.
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
..........F.................... 31 / 31 (100%)
Time: 441 ms, Memory: 14.00MB
There was 1 failure:
1) Magento2\Tests\Files\LineLengthUnitTest::testSniff
[LINE 32] Expected 0 error(s) in LineLengthUnitTest.inc but found 1 error(s). The error(s) found were:
-> Line exceeds maximum limit of 120 characters; contains 202 characters (Magento2.Files.LineLength.MaxExceeded)
/home/matthias/PhpstormProjects/magento-coding-standard/vendor/squizlabs/php_codesniffer/tests/Standards/AbstractSniffUnitTest.php:205
FAILURES!
Tests: 31, Assertions: 0, Failures: 1.
Actual result
The long string is missed:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
............................... 31 / 31 (100%)
Time: 519 ms, Memory: 14.00MB
OK (31 tests, 0 assertions)
The text was updated successfully, but these errors were encountered:
Preconditions
Steps to reproduce
in
Magento2/Tests/Files/LineLengthUnitTest.inc
, add this line:Run
vendor/bin/phpunit
Expected result
An error as the line contains no translation but only the keywords "Phrase" and "__" inside a string, e.g.
Actual result
The long string is missed:
The text was updated successfully, but these errors were encountered: