Unit Tests: after [35186], "upgrade" the Canonical fixtures.

See #30017, #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@35191 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-10-15 05:50:40 +00:00
parent 3d7aa47df8
commit d424f690d2
4 changed files with 11 additions and 30 deletions
+1 -11
View File
@@ -38,11 +38,7 @@ class WP_Canonical_UnitTestCase extends WP_UnitTestCase {
*
* @since 4.1.0
*/
public static function generate_shared_fixtures() {
global $wp_rewrite;
$factory = new WP_UnitTest_Factory;
public static function generate_shared_fixtures( $factory ) {
self::$old_current_user = get_current_user_id();
self::$author_id = $factory->user->create( array( 'user_login' => 'canonical-author' ) );
@@ -130,8 +126,6 @@ class WP_Canonical_UnitTestCase extends WP_UnitTestCase {
$tag1 = $factory->term->create( array( 'name' => 'post-formats' ) );
self::$term_ids[ $tag1 ] = 'post_tag';
self::commit_transaction();
}
/**
@@ -140,8 +134,6 @@ class WP_Canonical_UnitTestCase extends WP_UnitTestCase {
* @since 4.1.0
*/
public static function delete_shared_fixtures() {
global $wp_rewrite;
if ( is_multisite() ) {
wpmu_delete_user( self::$author_id );
} else {
@@ -165,8 +157,6 @@ class WP_Canonical_UnitTestCase extends WP_UnitTestCase {
self::$comment_ids = array();
self::$term_ids = array();
self::$terms = array();
self::commit_transaction();
}
/**