Make WordPress Core


Ignore:
Timestamp:
03/07/2023 05:46:16 AM (15 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.json

    r53261 r55471  
    2020                "isValid": true,
    2121                "attributes": {
    22                     "url": "https://cldup.com/uuUqE_dXzy.jpg",
     22                    "url": "https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190",
    2323                    "alt": "Image gallery image",
    2424                    "caption": "",
     25                    "id": 1421,
    2526                    "sizeSlug": "large",
    2627                    "linkDestination": "none"
     
    3233                "isValid": true,
    3334                "attributes": {
    34                     "url": "http://google.com/hi.png",
     35                    "url": "https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580",
    3536                    "alt": "Image gallery image",
    3637                    "caption": "",
     38                    "id": 1440,
    3739                    "sizeSlug": "large",
    3840                    "linkDestination": "none"
Note: See TracChangeset for help on using the changeset viewer.