[wp-trac] [WordPress Trac] #39265: Missing @covers and @uses in the comments block in phpunt test for wordpress

WordPress Trac noreply at wordpress.org
Tue Mar 21 22:14:47 UTC 2017


#39265: Missing @covers and @uses in the comments block in phpunt test for
wordpress
------------------------------+------------------------------
 Reporter:  pbearne           |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+------------------------------

Comment (by jnylen0):

 Most of https://phpunit.de/manual/current/en/code-coverage-analysis.html
 is dedicated to setting up automated code coverage.

 Reading closer, the `@covers` annotation is a '''supplement''' to this
 automated coverage, and I don't think you can generate a report from
 manual annotations only.

 @jorbin has already set this up:  https://daily.jorb.in/2015/10/automated-
 code-coverage-of-wordpress-core-php-code/

 The basic way to run it is as follows, but I get a mysterious error when I
 do so:

 {{{
 $ phpunit --coverage-html coverage-dir
 Installing...
 Running as single site... To run multisite, use -c
 tests/phpunit/multisite.xml
 Not running ajax tests. To execute these, use --group ajax.
 Not running ms-files tests. To execute these, use --group ms-files.
 Not running external-http tests. To execute these, use --group external-
 http.
 PHPUnit 5.7.15 by Sebastian Bergmann and contributors.

 Cannot modify header information - headers already sent by (output started
 at /home/james/wp/wordpress-develop-
 official/tests/phpunit/includes/bootstrap.php:62)
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39265#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list