Make WordPress Core

Ticket #50267: 50267-1-fix-config.patch

File 50267-1-fix-config.patch, 3.7 KB (added by jrf, 4 years ago)

Fix the code coverage configuration in phpunit.xml.dist

  • phpunit.xml.dist

    From 1433dbcaf9f176fad5434ed8e81a4cd242124934 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Sun, 23 Aug 2020 15:12:08 +0200
    Subject: [PATCH] Tests: fix code coverage setup
    
    Use the `build` directory, not the `src` directory and update the exclusion list to reflect the files and directories as currently in WP Core.
    ---
     phpunit.xml.dist | 53 +++++++++++++++++++++++++-----------------------
     1 file changed, 28 insertions(+), 25 deletions(-)
    
    diff --git a/phpunit.xml.dist b/phpunit.xml.dist
    index b7da1303c1..cebef5de31 100644
    a b  
    4242        </listeners>
    4343        <filter>
    4444                <whitelist addUncoveredFilesFromWhitelist="true">
    45                         <directory suffix=".php">src</directory>
     45                        <directory suffix=".php">build</directory>
    4646                        <exclude>
    4747                                <!-- Third party library exclusions. -->
    48                                 <directory suffix=".php">src/wp-includes/ID3</directory>
    49                                 <directory suffix=".php">src/wp-includes/IXR</directory>
    50                                 <directory suffix=".php">src/wp-includes/random_compat</directory>
    51                                 <directory suffix=".php">src/wp-includes/Requests</directory>
    52                                 <directory suffix=".php">src/wp-includes/SimplePie</directory>
    53                                 <directory suffix=".php">src/wp-includes/Text</directory>
     48                                <directory suffix=".php">build/wp-includes/ID3</directory>
     49                                <directory suffix=".php">build/wp-includes/IXR</directory>
     50                                <directory suffix=".php">build/wp-includes/random_compat</directory>
     51                                <directory suffix=".php">build/wp-includes/PHPMailer</directory>
     52                                <directory suffix=".php">build/wp-includes/Requests</directory>
     53                                <directory suffix=".php">build/wp-includes/SimplePie</directory>
     54                                <directory suffix=".php">build/wp-includes/sodium_compat</directory>
     55                                <directory suffix=".php">build/wp-includes/Text</directory>
    5456
    55                                 <file>src/wp-admin/includes/class-ftp*</file>
    56                                 <file>src/wp-admin/includes/class-pclzip.php</file>
    57                                 <file>src/wp-admin/includes/deprecated.php</file>
    58                                 <file>src/wp-admin/includes/ms-deprecated.php</file>
     57                                <!-- Plugins and themes. -->
     58                                <directory suffix=".php">build/wp-content/</directory>
    5959
    60                                 <file>src/wp-includes/atomlib.php</file>
    61                                 <file>src/wp-includes/class-IXR.php</file>
    62                                 <file>src/wp-includes/class-json.php</file>
    63                                 <file>src/wp-includes/class-phpass.php</file>
    64                                 <file>src/wp-includes/class-phpmailer.php</file>
    65                                 <file>src/wp-includes/class-pop3.php</file>
    66                                 <file>src/wp-includes/class-requests.php</file>
    67                                 <file>src/wp-includes/class-simplepie.php</file>
    68                                 <file>src/wp-includes/class-smtp.php</file>
    69                                 <file>src/wp-includes/class-snoopy.php</file>
    70                                 <file>src/wp-includes/deprecated.php</file>
    71                                 <file>src/wp-includes/ms-deprecated.php</file>
    72                                 <file>src/wp-includes/pluggable-deprecated.php</file>
    73                                 <file>src/wp-includes/rss.php</file>
     60                                <file>build/wp-admin/includes/class-ftp*</file>
     61                                <file>build/wp-admin/includes/class-pclzip.php</file>
     62                                <file>build/wp-admin/includes/deprecated.php</file>
     63                                <file>build/wp-admin/includes/ms-deprecated.php</file>
     64
     65                                <file>build/wp-includes/atomlib.php</file>
     66                                <file>build/wp-includes/class-IXR.php</file>
     67                                <file>build/wp-includes/class-json.php</file>
     68                                <file>build/wp-includes/class-phpass.php</file>
     69                                <file>build/wp-includes/class-pop3.php</file>
     70                                <file>build/wp-includes/class-requests.php</file>
     71                                <file>build/wp-includes/class-simplepie.php</file>
     72                                <file>build/wp-includes/class-snoopy.php</file>
     73                                <file>build/wp-includes/deprecated.php</file>
     74                                <file>build/wp-includes/ms-deprecated.php</file>
     75                                <file>build/wp-includes/pluggable-deprecated.php</file>
     76                                <file>build/wp-includes/rss.php</file>
    7477                        </exclude>
    7578                </whitelist>
    7679        </filter>