From 4ed7d2d05e04e07330fd6705af35124be0122953 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 26 Jul 2015 09:14:06 +0000 Subject: [PATCH] Update `Test_WP_Customize_Nav_Menus::test_available_items_template()` after [33413]. fixes #32715. git-svn-id: https://develop.svn.wordpress.org/trunk@33424 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/customize/nav-menus.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/customize/nav-menus.php b/tests/phpunit/tests/customize/nav-menus.php index 2eba4b3c24..d85e75c8b8 100644 --- a/tests/phpunit/tests/customize/nav-menus.php +++ b/tests/phpunit/tests/customize/nav-menus.php @@ -497,7 +497,7 @@ class Test_WP_Customize_Nav_Menus extends WP_UnitTestCase { if ( $post_types ) { foreach ( $post_types as $type ) { $this->assertContains( 'available-menu-items-post_type-' . esc_attr( $type->name ), $template ); - $this->assertContains( '

' . esc_html( $type->labels->singular_name ), $template ); + $this->assertRegExp( '#

\s*' . esc_html( $type->labels->singular_name ) . '#', $template ); $this->assertContains( 'data-type="post_type"', $template ); $this->assertContains( 'data-object="' . esc_attr( $type->name ) . '"', $template ); } @@ -507,14 +507,14 @@ class Test_WP_Customize_Nav_Menus extends WP_UnitTestCase { if ( $taxonomies ) { foreach ( $taxonomies as $tax ) { $this->assertContains( 'available-menu-items-taxonomy-' . esc_attr( $tax->name ), $template ); - $this->assertContains( '

' . esc_html( $tax->labels->singular_name ), $template ); + $this->assertRegExp( '#

\s*' . esc_html( $tax->labels->singular_name ) . '#', $template ); $this->assertContains( 'data-type="taxonomy"', $template ); $this->assertContains( 'data-object="' . esc_attr( $tax->name ) . '"', $template ); } } $this->assertContains( 'available-menu-items-custom_type', $template ); - $this->assertContains( '

Custom', $template ); + $this->assertRegExp( '#

\s*Custom#', $template ); $this->assertContains( 'data-type="custom_type"', $template ); $this->assertContains( 'data-object="custom_object"', $template ); }