diff --git a/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.html b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.html new file mode 100644 index 0000000000..498c7752e3 --- /dev/null +++ b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.html @@ -0,0 +1,26 @@ + + + diff --git a/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.json b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.json new file mode 100644 index 0000000000..12b5166066 --- /dev/null +++ b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.json @@ -0,0 +1,46 @@ +[ + { + "name": "core/gallery", + "isValid": true, + "attributes": { + "images": [], + "ids": [], + "shortCodeTransforms": [], + "caption": "Gallery Caption", + "imageCrop": true, + "fixedHeight": true, + "linkTo": "none", + "sizeSlug": "large", + "allowResize": false, + "className": "columns-2" + }, + "innerBlocks": [ + { + "name": "core/image", + "isValid": true, + "attributes": { + "url": "https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190", + "alt": "Image gallery image", + "caption": "", + "id": 1421, + "sizeSlug": "large", + "linkDestination": "none" + }, + "innerBlocks": [] + }, + { + "name": "core/image", + "isValid": true, + "attributes": { + "url": "https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580", + "alt": "Image gallery image", + "caption": "", + "id": 1440, + "sizeSlug": "large", + "linkDestination": "none" + }, + "innerBlocks": [] + } + ] + } +] diff --git a/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.parsed.json b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.parsed.json new file mode 100644 index 0000000000..619adef3d8 --- /dev/null +++ b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.parsed.json @@ -0,0 +1,62 @@ +[ + { + "blockName": "core/gallery", + "attrs": { + "linkTo": "none" + }, + "innerBlocks": [ + { + "blockName": "core/image", + "attrs": { + "id": 1421, + "sizeSlug": "large", + "linkDestination": "none", + "inheritedAttributes": { + "linkDestination": true, + "linkTarget": true, + "sizeSlug": true + } + }, + "innerBlocks": [], + "innerHTML": "\n\t
\n\t\t\n\t
\n\t", + "innerContent": [ + "\n\t
\n\t\t\n\t
\n\t" + ] + }, + { + "blockName": "core/image", + "attrs": { + "id": 1440, + "sizeSlug": "large", + "linkDestination": "none", + "inheritedAttributes": { + "linkDestination": true, + "linkTarget": true, + "sizeSlug": true + } + }, + "innerBlocks": [], + "innerHTML": "\n\t
\n\t\t\n\t
\n\t", + "innerContent": [ + "\n\t
\n\t\t\n\t
\n\t" + ] + } + ], + "innerHTML": "\n\n\t\n\n\t\n\t\n\n", + "innerContent": [ + "\n\n\t", + null, + "\n\n\t", + null, + "\n\t\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ "\n" ] + } + +] diff --git a/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.serialized.html b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.serialized.html new file mode 100644 index 0000000000..0eeab028d1 --- /dev/null +++ b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.serialized.html @@ -0,0 +1,9 @@ + + + diff --git a/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.server.html b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.server.html new file mode 100644 index 0000000000..18e3f1d8c8 --- /dev/null +++ b/tests/phpunit/data/blocks/fixtures/core__gallery-with-caption.server.html @@ -0,0 +1,26 @@ + + + diff --git a/tests/phpunit/data/blocks/fixtures/core__gallery.html b/tests/phpunit/data/blocks/fixtures/core__gallery.html index 54f9991f88..3db587c8d7 100644 --- a/tests/phpunit/data/blocks/fixtures/core__gallery.html +++ b/tests/phpunit/data/blocks/fixtures/core__gallery.html @@ -1,14 +1,24 @@ -\n", "innerContent": [ - "\n\n" ] }, - { - "blockName": null, - "attrs": {}, - "innerBlocks": [], - "innerHTML": "\n", - "innerContent": [ - "\n" - ] - } -] \ No newline at end of file + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ "\n" ] + } + +] diff --git a/tests/phpunit/data/blocks/fixtures/core__gallery.serialized.html b/tests/phpunit/data/blocks/fixtures/core__gallery.serialized.html index bc5d6be414..6ab87b7c60 100644 --- a/tests/phpunit/data/blocks/fixtures/core__gallery.serialized.html +++ b/tests/phpunit/data/blocks/fixtures/core__gallery.serialized.html @@ -1,3 +1,9 @@ - - \ No newline at end of file + + diff --git a/tests/phpunit/data/blocks/fixtures/core__gallery.server.html b/tests/phpunit/data/blocks/fixtures/core__gallery.server.html index 54757c5e30..fdea3c8cee 100644 --- a/tests/phpunit/data/blocks/fixtures/core__gallery.server.html +++ b/tests/phpunit/data/blocks/fixtures/core__gallery.server.html @@ -1,15 +1,25 @@ -