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:
Scott Taylor 2015-10-13 02:35:47 +00:00
parent e31a0390b1
commit 455392c531
1 changed files with 3 additions and 0 deletions

View File

@ -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 );