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
This commit is contained in:
parent
b37bfd8e29
commit
4286a3e63b
@ -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( '<a href="http://example.org/" class="custom-logo-link" rel="home" itemprop="url"><img width="50" height="50" src="%1$s" class="custom-logo attachment-%2$s" alt="%3$s" data-size="%2$s" itemprop="logo" /></a>', $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( '<a href="http://example.org/" class="custom-logo-link" rel="home" itemprop="url">' . $image . '</a>' );
|
||||
the_custom_logo();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user