mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Widgets: after [35106], ensure that the widget required by the unit test is registered.
See #19450. git-svn-id: https://develop.svn.wordpress.org/trunk@35113 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -609,6 +609,7 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
function test_the_widget_custom_before_title_arg() {
|
||||
register_widget( 'WP_Widget_Text' );
|
||||
|
||||
ob_start();
|
||||
the_widget(
|
||||
@@ -617,6 +618,8 @@ class Tests_Widgets extends WP_UnitTestCase {
|
||||
array( 'before_widget' => '<span class="special %s">', 'after_widget' => '</span>' )
|
||||
);
|
||||
$actual = ob_get_clean();
|
||||
|
||||
unregister_widget( 'WP_Widget_Text' );
|
||||
|
||||
$this->assertRegExp( '/<span class="special widget_text">/', $actual );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user