Commit Graph

8 Commits

Author SHA1 Message Date
Aaron Jorbin
747a327c3c Set a whitelist for PHPUnit code coverage.
PHPUnit requires a whitelist as of version 5 in order to generate code coverage. See https://github.com/sebastianbergmann/phpunit-documentation/issues/335 .

Fixes #36867.



git-svn-id: https://develop.svn.wordpress.org/trunk@37449 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 20:22:57 +00:00
Jeremy Felt
888d3524f5 Tests: Exclude ms-files test group from default PHPUnit config
Multisite specific tests run as normal with `phpunit.xml.dist` and multisite constants defined. The `ms-files` group causes pollution when mixed with the rest of the tests, so it should be excluded here too.

See #36566.


git-svn-id: https://develop.svn.wordpress.org/trunk@37269 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 17:10:21 +00:00
Scott Taylor
2845280ffd Unit Tests: add SpeedTrapListener to phpunit/includes and add the config node to phpunit.xml.dist.
See #30017, #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@35214 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 00:27:28 +00:00
Gary Pendergast
7c508ff9fa Tests: Exclude the oembed/headers.php test file, which was marked as PHP >= 5.3.0 in [34904].
See #32522.



git-svn-id: https://develop.svn.wordpress.org/trunk@34905 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 12:00:34 +00:00
Gary Pendergast
a170c1f67e Embeds: After [34903], remove an accidentally included text domain, and exclude a test failing in PHP 5.2.
git-svn-id: https://develop.svn.wordpress.org/trunk@34904 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 11:00:59 +00:00
Boone Gorges
df11fb8593 Exclude external-http tests when running phpunit.
The external-http tests are very slow, and `Wp_Http` functionality is fairly
isolated, so the benefits of skipping these tests by default outweigh the
risks.

A `grunt phpunit:external-http` subtask has been added, to ensure that the
tests are executed during exhaustive runs of the test suite, such as in
continuous integration.

Fixes #30304.

git-svn-id: https://develop.svn.wordpress.org/trunk@30298 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-10 14:48:28 +00:00
Boone Gorges
f7dbf962d7 Only reset taxonomies and post types between tests when running core tests.
A growing number of plugins and other WP-based projects use the core test
tools, such as WP_UnitTestCase, as the basis of their own tests and continuous
integration setups. At the same time, many of these third-party plugins use
custom post types and taxonomies, which are generally registered a single time
during a run of the tests: at 'init', before the testcases have run. Wiping out
these globals between tests will mess with these third-party builds.

Best practice for plugin developers is probably to clean up their own post types
and taxonomies and then reinitialize before each test. But, in the interest of
not breaking everyone's builds, the core test suite will not enforce this.

Fixes #29827.

git-svn-id: https://develop.svn.wordpress.org/trunk@29869 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-10 20:25:39 +00:00
Andrew Nacin
8045afd81b Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root.

see #25088.


git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:39:34 +00:00