当我尝试用phpdbg运行具有覆盖率的phpunit时,我得到了错误"This build of PHPDBG not support code coverage“。我在PHAR行中找到了生成此错误的代码:
if (!\function_exists('PHPUnit\\phpdbg_start_oplog')) {
throw new \PHPUnit\SebastianBergmann\CodeCoverage\RuntimeException('This build of PHPDBG does not support code coverage');
}然后,我运行并获得以下结果:
prompt> ev function_exists('phpdbg_start_oplog');
1据我所知,问题出现在phpdbg_start_oplog之前的命名空间中。那么,为什么在Phar语言中phpdbg_start_oplog以PHPUnit命名空间为前缀呢?
Sebastian Bergmann和贡献者的PHPUnit 9.1.4。
PHP 7.4.1 (cli) (built: Dec 28 2019 11:16:02) ( NTS )
发布于 2020-05-08 22:48:31
您在PHPUnit (或PHP-Scoper,构建PHPUnit的PHAR发行版时使用的工具之一)中发现了一个bug。I opened a ticket for this issue on GitHub。
https://stackoverflow.com/questions/61680024
复制相似问题