Add filter rules to phpunit.xml.dist to exclude *.api.php files

Created on 2 December 2021, almost 3 years ago
Updated 17 February 2023, over 1 year ago

Problem/Motivation

Currently all *.api.php file is part of the code coverage report, and they are 100% red, because they are there only for documentation purposes.

Proposed resolution

Add exclude filters to ./core/phpunit.xml.dist file.

Remaining tasks

Do it.

📌 Task
Status

Fixed

Version

10.1

Component
PHPUnit 

Last updated about 1 hour ago

Created by

🇭🇺Hungary Sweetchuck Budapest

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

    Not sure I see the "why" this should be done.
    Could you elaborate more

  • Status changed to Needs review over 1 year ago
  • 🇭🇺Hungary Sweetchuck Budapest

    - What is the purpose of the test coverage report?
    - It is intended to help identify areas of the system that have not been adequately tested, and to provide guidance on which tests should be conducted next.

    Not everything has to be covered with Unit or Kernel tests.
    Maybe a certain part of the code is covered with FunctionalJavascript test, but for that is very difficult to get coverage report.
    It is also true if a file is 100% green, it doesn't mean that it is covered with right and meaningful tests.

    Do we need to write test to cover the functions in any *.api.php files?
    Can we write test to cover the functions in any *.api.php files?

    If the answer is "no", then why are those files in the coverage report?

  • Status changed to Needs work over 1 year ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • @sweetchuck opened merge request.
  • Status changed to Needs review over 1 year ago
  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Thank you for the explanation. Will see what the committers think.

  • 🇬🇧United Kingdom catch

    Committed 433faff and pushed to 10.1.x. Thanks!

  • Status changed to Fixed over 1 year ago
    • catch committed 433faff8 on 10.1.x
      Issue #3252355 by Sweetchuck: Add filter rules to phpunit.xml.dist to...
  • 🇬🇧United Kingdom catch
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024