Commit Graph

8 Commits

Author SHA1 Message Date
Jeremy Felt 211c7ac373 Move tests for ms_files_rewriting to separate group, ms-files
When the `ms_files_rewriting` flag is enabled, `ms_upload_constants()` is required to properly set upload directory constants. Once this fires, it is impossible to clean up for a non `ms_files_rewriting` test by turning the option back off.

Excluding these tests by default offer a more consistent environment overall. Any tests written for uploaded files in multisite should ideally have a correspondign test in this area.

This commit also moves existing `ms_files_rewriting` tests for `test_switch_upload_dir()`.

Fixes #30256


git-svn-id: https://develop.svn.wordpress.org/trunk@30286 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-08 21:07:05 +00:00
Boone Gorges d63ceb08a3 Share fixtures across 'canonical' automated tests.
Sharing these fixtures results in a speed improvement of almost one minute per
run of the test suite.

My hope is that future WordPress developers will spend this extra minute with
their loved ones, for life on this earth is short, my friends, and the moments
you spend watching WP generate test data can never again be reclaimed from the
grizzled clutches of Time, and none of us are really getting younger, I mean,
geez, have you looked in the mirror lately, Gandalf?

See #30017.

git-svn-id: https://develop.svn.wordpress.org/trunk@30277 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-08 19:28:12 +00:00
Scott Taylor 9ab7f4b144 Avoid polluted `$table_prefix` and `$_wp_switched_stack` in multisite unit tests.
Add `WP_TESTS_TABLE_PREFIX` in `bootstrap.php` to ensure the original value for `$table_prefix` is always available. 

Props jeremyfelt.
Fixes #28692.


git-svn-id: https://develop.svn.wordpress.org/trunk@28943 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-01 18:51:46 +00:00
Andrew Nacin 9e24832a0e Add initial unit tests for multisite's bootstrap.
props jeremyfelt.
fixes #27884.


git-svn-id: https://develop.svn.wordpress.org/trunk@28910 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-29 22:50:44 +00:00
Scott Taylor 5c48c4f8a8 Allow `wp_die()` to die in plain text when running the test suite.
Props jorbin.
Fixes #27749.


git-svn-id: https://develop.svn.wordpress.org/trunk@28797 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-21 19:59:28 +00:00
Andrew Nacin 2105b8683d Test runner: Extend WP_PHPUnit_Util_Getopt instead of PHPUnit_TextUI_Command to parse incoming options.
props wawco.
fixes #26725.


git-svn-id: https://develop.svn.wordpress.org/trunk@26871 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-27 15:07:07 +00:00
Andrew Nacin 9d9a28b3e0 Test framework: Update path to multisite.xml.
props jeremyfelt.
fixes #25242.


git-svn-id: https://develop.svn.wordpress.org/trunk@25415 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 21:04:16 +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