Remove the Featured Content term filters when running Unit Tests. Set the return value of wp_get_object_terms() to a var before passing to array_shift() in test_get_object_terms_types(), which expects a var to be passed by reference.

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@26187 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2013-11-15 02:32:16 +00:00
parent 8c01596a75
commit 5de39fc2f1
3 changed files with 15 additions and 4 deletions

View File

@@ -381,4 +381,9 @@ function _cleanup_query_vars() {
if ( ! empty( $t->query_var ) )
$GLOBALS['wp']->add_query_var( $t->query_var );
}
}
function _clean_term_filters() {
remove_filter( 'get_terms', array( 'Featured_Content', 'hide_featured_term' ), 10, 2 );
remove_filter( 'get_the_terms', array( 'Featured_Content', 'hide_the_featured_term' ), 10, 3 );
}