Symfony测试失败

时间:2018-03-29 05:54:29

标签: php symfony symfony4 php-7.2

我想为Symfony 4贡献一些代码。因此,我遵循指南(https://symfony.com/doc/current/contributing/code/patches.html),分叉Symfony并调用测试。该指南说" PHP 5.5.9或更高版本"但是由于PHP 7新语法,测试失败。所以我切换到在Windows 7 x64上运行的PHP 7.2。

在触及任何代码之前运行php ./phpunit symfony时,大量测试失败。大多数测试都会失败并显示消息"其他弃用通知":

Testing src/Symfony/Component/Messenger
..............                                                    14 / 14 (100%)

Time: 3.66 seconds, Memory: 6.00MB

OK (14 tests, 25 assertions)

Other deprecation notices (1)

  1x: The each() function is deprecated. This message will be suppressed on further calls

KO src/Symfony/Component/Messenger

最后它说,"好但不完整,......"

Testing src/Symfony/Bundle/FrameworkBundle
.............................................................   61 / 1083 (  5%)
.............................................................  122 / 1083 ( 11%)
.............................................................  183 / 1083 ( 16%)
.............................................................  244 / 1083 ( 22%)
.............................................................  305 / 1083 ( 28%)
.............................................................  366 / 1083 ( 33%)
.............................................................  427 / 1083 ( 39%)
.....................S.......................................  488 / 1083 ( 45%)
.............................................................  549 / 1083 ( 50%)
.............................................................  610 / 1083 ( 56%)
..................SS.........................................  671 / 1083 ( 61%)
.............................................................  732 / 1083 ( 67%)
.............................................................  793 / 1083 ( 73%)
.............................................................  854 / 1083 ( 78%)
.............................................................  915 / 1083 ( 84%)
.............................................................  976 / 1083 ( 90%)
............................................................. 1037 / 1083 ( 95%)
..............................................                1083 / 1083 (100%)

Time: 3.94 minutes, Memory: 108.00MB

OK, but incomplete, skipped, or risky tests!
Tests: 1083, Assertions: 2282, Skipped: 3.

Legacy deprecation notices (14)

Other deprecation notices (1)

  1x: The each() function is deprecated. This message will be suppressed on further calls

KO src/Symfony/Bundle/FrameworkBundle

还有"真实"错误:

1) Symfony\Component\Security\Core\Tests\Encoder\Argon2iPasswordEncoderTest::testValidationWithConfig
password_hash(): Memory cost is outside of allowed memory range

C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Security\Core\Encoder\Argon2iPasswordEncoder.php:105
C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Security\Core\Encoder\Argon2iPasswordEncoder.php:67
C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Security\Core\Tests\Encoder\Argon2iPasswordEncoderTest.php:34

或在这里:

1) Symfony\Component\Console\Tests\Helper\QuestionHelperTest::testAskChoice
Symfony\Component\Console\Exception\RuntimeException: Aborted

C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Console\Helper\QuestionHelper.php:118
C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Console\Helper\QuestionHelper.php:67
C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Console\Helper\QuestionHelper.php:369
C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Console\Helper\QuestionHelper.php:70
C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Console\Tests\Helper\QuestionHelperTest.php:89

或在这里:

1) Symfony\Component\VarDumper\Tests\Dumper\ServerDumperTest::testDump
Symfony\Component\Process\Exception\ProcessTimedOutException: The process "C:\Software\Development\Php7\php.exe" exceede
d the timeout of 9 seconds.

C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Process\Process.php:1154
C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\Process\Process.php:383
C:\Daten\Projekte\2018\dev\symfony\src\Symfony\Component\VarDumper\Tests\Dumper\ServerDumperTest.php:92

0 个答案:

没有答案