Make WordPress Core


Ignore:
Timestamp:
03/07/2023 05:46:16 AM (21 months ago)
Author:
peterwilsoncc
Message:

Build/Tests Tools: Add unit tests for Gallery blocks.

Introduces unit tests for the following blocks

  • Gallery block with caption
  • Gallery block, deprecations 1 thru 7

Updates the unit tests for the following blocks to match the counterparts stored in the Gutenberg repository:

  • Gallery block
  • Gallery block with columns

Modifies Tests_Blocks_Render::test_do_block_output() to ignore white space at the end of lines to account for whitespace equivalence in HTML.

Props peterwilsoncc, isabel_brison, gziolo.
Fixes #55571.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/data/blocks/fixtures/core__gallery__columns.server.html

    r55282 r55471  
    11
    2 <figure class="wp-block-gallery has-nested-images is-cropped columns-1 wp-block-gallery-1 is-layout-flex" >
    3    
     2<figure class="wp-block-gallery has-nested-images columns-1 is-cropped wp-block-gallery-1 is-layout-flex">
    43    <figure class="wp-block-image size-large">
    5         <img src="https://cldup.com/uuUqE_dXzy.jpg" alt="Image gallery image" />
     4        <img data-id="1421"
     5            src="https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190"
     6            alt="Image gallery image"
     7            class="wp-image-1421"
     8        />
    69    </figure>
    7    
    8 
    9    
    1010    <figure class="wp-block-image size-large">
    11         <img src="http://google.com/hi.png" alt="Image gallery image" />
     11        <img data-id="1440"
     12            src="https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580"
     13            alt="Image gallery image"
     14            class="wp-image-1440"
     15        />
    1216    </figure>
    13    
    1417</figure>
    15 
Note: See TracChangeset for help on using the changeset viewer.