Unit Tests: one $factory to rule them all, and it shall be static.

Using more than one instance of `WP_UnitTest_Factory` causes all kinds of craziness, due to out-of-sync internal generator sequences. Since we want to use `setUpBeforeClass`, we were creating ad hoc instances. To avoid that, we were injecting one `static` instance via Dependency Injection in `wpSetUpBeforeClass`. All tests should really use the `static` instance, so we will remove the instance prop `$factory`.

Replace `$this->factory` with `self::$factory` over 2000 times.
Rewrite all of the tests that were hard-coding dynamic values. 

#YOLOFriday


Built from https://develop.svn.wordpress.org/trunk@35225


git-svn-id: http://core.svn.wordpress.org/trunk@35191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-10-16 21:05:25 +00:00
parent 3693228a9b
commit a2a65a06bd

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-35224';
$wp_version = '4.4-alpha-35225';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.