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.json

    r53261 r55471  
    77            "ids": [],
    88            "shortCodeTransforms": [],
     9            "columns": 1,
    910            "caption": "",
    1011            "imageCrop": true,
     
    1213            "linkTo": "none",
    1314            "sizeSlug": "large",
    14             "allowResize": false,
    15             "className": "columns-1",
    16             "columns": 1
     15            "allowResize": false
    1716        },
    1817        "innerBlocks": [
     
    2120                "isValid": true,
    2221                "attributes": {
    23                     "url": "https://cldup.com/uuUqE_dXzy.jpg",
     22                    "url": "https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190",
    2423                    "alt": "Image gallery image",
    2524                    "caption": "",
     25                    "id": 1421,
    2626                    "sizeSlug": "large",
    2727                    "linkDestination": "none"
     
    3333                "isValid": true,
    3434                "attributes": {
    35                     "url": "http://google.com/hi.png",
     35                    "url": "https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580",
    3636                    "alt": "Image gallery image",
    3737                    "caption": "",
     38                    "id": 1440,
    3839                    "sizeSlug": "large",
    3940                    "linkDestination": "none"
Note: See TracChangeset for help on using the changeset viewer.