mirror of
git://develop.git.wordpress.org/
synced 2025-02-22 15:42:29 +01: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:
parent
e31a0390b1
commit
455392c531
@ -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 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user