From 4286a3e63bdefb5cceeabbc8534161521eeba5d9 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Wed, 9 Mar 2016 23:27:28 +0000 Subject: [PATCH] Tests: Let's not reinvent `wp_get_attachment_image()`. See https://travis-ci.org/aaronjorbin/develop.wordpress/builds/114913862 See #36086. git-svn-id: https://develop.svn.wordpress.org/trunk@36914 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/general/template.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/general/template.php b/tests/phpunit/tests/general/template.php index 46a6842251..5b987c872d 100644 --- a/tests/phpunit/tests/general/template.php +++ b/tests/phpunit/tests/general/template.php @@ -244,10 +244,14 @@ class Tests_General_Template extends WP_UnitTestCase { the_custom_logo(); $this->_set_custom_logo(); - $size = get_theme_support( 'custom-logo', 'size' ); - $expected = sprintf( '', $this->custom_logo_url, $size, basename( $this->custom_logo_url ) ); + $size = get_theme_support( 'custom-logo', 'size' ); + $image = wp_get_attachment_image( $this->custom_logo_id, $size, false, array( + 'class' => "custom-logo attachment-$size", + 'data-size' => $size, + 'itemprop' => 'logo', + ) ); - $this->expectOutputString( $expected ); + $this->expectOutputString( '' ); the_custom_logo(); }