From 42687da29c1528a42e8f869cd3eb6a5fbedf9c30 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 19 Oct 2015 21:26:24 +0000 Subject: [PATCH] Widgets: Modify unit test assertion to be compatible with `widget_nav_menu` option being filtered by plugin to return `ArrayIterator`. Modifies assertion added in [35100]. See #26876. See #32474. git-svn-id: https://develop.svn.wordpress.org/trunk@35272 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/widgets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/widgets.php b/tests/phpunit/tests/widgets.php index 7b64efb902..b864408f62 100644 --- a/tests/phpunit/tests/widgets.php +++ b/tests/phpunit/tests/widgets.php @@ -467,8 +467,8 @@ class Tests_Widgets extends WP_UnitTestCase { // Pretend this widget is new. delete_option( 'widget_nav_menu' ); - $never_used = get_option( 'widget_nav_menu' ); - $this->assertFalse( $never_used ); + $never_used = get_option( 'widget_nav_menu', array() ); + $this->assertEquals( array(), (array) $never_used ); wp_widgets_init(); $wp_widget_search = $wp_registered_widgets['search-2']['callback'][0];