Отчет покрытия PHPUnit продолжает возвращать пример содержимого - PullRequest
1 голос
/ 04 ноября 2019

В настоящее время мы используем PHPUnit ( и PHPUnit 7.1.5 и 7.4.5 от Себастьяна Бергманна и авторы ) для тестирования кода. У нас есть несколько наборов тестов, и мы хотим запустить отчет о покрытии.

Я могу выполнить тест просто отлично и, как и ожидалось. Теперь, с включенным xdebug и флагом cover-html, я запускаю его снова, но вместо хорошего отчета я получаю таблицу «Big Table Sorting - 1000 Rows» с 1000 строк «Sample Content» в качестве вывода в консоли и безотчеты в указанном каталоге.

Я не могу найти связанных с этим проблем через Google, кто-нибудь знает, как это исправить?

Исключенная команда:

php bin/phpunit --filter ClassnameTest::testMethodname --coverage-html ./reports/20191103 

<!DOCTYPE HTML>
<html lang="en-US">
<head>
    <meta charset="UTF-8">
    <title>rowsorter.js - big table</title>
    <script type="text/javascript" src="../dist/RowSorter.js"></script>
</head>
<body>

<style>
table {width: 80%; font-size: 14px; font-family: tahoma, arial, sans-serif;}
table thead th {background-color: #ccc; padding: 5px 8px;}
table td {background-color: #ddd; padding: 5px 8px;}

table.sorting-table {cursor: move;}
table tr.sorting-row td {background-color: #8b8;}
table td.div {padding: 0;}
table td.div > div {background-color: #b88;line-height:2;}
</style>

<table class="sample_table">
    <thead>
        <tr>
            <th colspan="4">Big Table Sorting - 1000 Rows</th>
        </tr>
    </thead>
    <tbody>
            <tr>
            <td>Row 0</td>
            <td>Sample Content 0</td>
            <td class="div"><div><div><span>Inner Elements 0</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 1</td>
            <td>Sample Content 1</td>
            <td class="div"><div><div><span>Inner Elements 1</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 2</td>
            <td>Sample Content 2</td>
            <td class="div"><div><div><span>Inner Elements 2</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 3</td>
            <td>Sample Content 3</td>
            <td class="div"><div><div><span>Inner Elements 3</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 4</td>
            <td>Sample Content 4</td>
            <td class="div"><div><div><span>Inner Elements 4</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 5</td>
            <td>Sample Content 5</td>
            <td class="div"><div><div><span>Inner Elements 5</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
           
        
        <!-- .. up to 1000 .. -->
        
        </tbody>
    <tfoot>
        <tr>
            <td colspan="4"><button type="button" onclick="RowSorter.destroy('.sample_table');">Destroy RowSorter</button></td>
        </tr>
    </tfoot>
</table>

<script type="text/javascript">
RowSorter(".sample_table");
</script>

</body>
</html>
...