Skip to content

Commit

Permalink
E2E Tests: Update fixtures.
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Feb 21, 2020
1 parent f125007 commit 04584fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/block-library/src/site-title/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
* @return string The render.
*/
function render_block_core_site_title( $attributes ) {
$tag_name = 0 === $attributes['level'] ? 'p' : 'h' . ( $attributes['level'] || 1 );
$tag_name = 'h1';
if ( isset( $attributes['level'] ) ) {
$tag_name = 0 === $attributes['level'] ? 'p' : 'h' . $attributes['level'];
}
return sprintf( '<%1$s>%2$s</%1$s>', $tag_name, get_bloginfo( 'name' ) );
}

Expand Down
4 changes: 3 additions & 1 deletion packages/e2e-tests/fixtures/blocks/core__site-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"clientId": "_clientId_0",
"name": "core/site-title",
"isValid": true,
"attributes": {},
"attributes": {
"level": 1
},
"innerBlocks": [],
"originalContent": ""
}
Expand Down

0 comments on commit 04584fe

Please sign in to comment.