Changeset 55471
- Timestamp:
- 03/07/2023 05:46:16 AM (21 months ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 40 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/data/blocks/fixtures/core__gallery.html
r53261 r55471 1 1 <!-- wp:gallery {"linkTo":"none","className":"columns-2"} --> 2 <figure class="wp-block-gallery has-nested-images columns-default is-cropped columns-2"> 3 <!-- wp:image {"sizeSlug":"large","linkDestination":"none"} --> 2 <figure 3 class="wp-block-gallery has-nested-images columns-default is-cropped columns-2" 4 > 5 <!-- wp:image {"id":1421,"sizeSlug":"large","linkDestination":"none"} --> 4 6 <figure class="wp-block-image size-large"> 5 <img src="https://cldup.com/uuUqE_dXzy.jpg" alt="Image gallery image" /> 7 <img 8 src="https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190" 9 alt="Image gallery image" 10 class="wp-image-1421" 11 /> 6 12 </figure> 7 13 <!-- /wp:image --> 8 14 9 <!-- wp:image {" sizeSlug":"large","linkDestination":"none"} -->15 <!-- wp:image {"id":1440,"sizeSlug":"large","linkDestination":"none"} --> 10 16 <figure class="wp-block-image size-large"> 11 <img src="http://google.com/hi.png" alt="Image gallery image" /> 17 <img 18 src="https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580" 19 alt="Image gallery image" 20 class="wp-image-1440" 21 /> 12 22 </figure> 13 23 <!-- /wp:image --> -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery.json
r53261 r55471 20 20 "isValid": true, 21 21 "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", 23 23 "alt": "Image gallery image", 24 24 "caption": "", 25 "id": 1421, 25 26 "sizeSlug": "large", 26 27 "linkDestination": "none" … … 32 33 "isValid": true, 33 34 "attributes": { 34 "url": "http ://google.com/hi.png",35 "url": "https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580", 35 36 "alt": "Image gallery image", 36 37 "caption": "", 38 "id": 1440, 37 39 "sizeSlug": "large", 38 40 "linkDestination": "none" -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery.parsed.json
r53261 r55471 10 10 "blockName": "core/image", 11 11 "attrs": { 12 "id": 1421, 12 13 "sizeSlug": "large", 13 14 "linkDestination": "none" 14 15 }, 15 16 "innerBlocks": [], 16 "innerHTML": "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"Image gallery image\"/>\n\t</figure>\n\t",17 "innerHTML": "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img\n\t\t\tsrc=\"https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190\"\n\t\t\talt=\"Image gallery image\"\n\t\t\tclass=\"wp-image-1421\"\n\t\t/>\n\t</figure>\n\t", 17 18 "innerContent": [ 18 "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"Image gallery image\"/>\n\t</figure>\n\t"19 "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img\n\t\t\tsrc=\"https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190\"\n\t\t\talt=\"Image gallery image\"\n\t\t\tclass=\"wp-image-1421\"\n\t\t/>\n\t</figure>\n\t" 19 20 ] 20 21 }, … … 22 23 "blockName": "core/image", 23 24 "attrs": { 25 "id": 1440, 24 26 "sizeSlug": "large", 25 27 "linkDestination": "none" 26 28 }, 27 29 "innerBlocks": [], 28 "innerHTML": "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img src=\"http://google.com/hi.png\" alt=\"Image gallery image\"/>\n\t</figure>\n\t",30 "innerHTML": "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img\n\t\t\tsrc=\"https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580\"\n\t\t\talt=\"Image gallery image\"\n\t\t\tclass=\"wp-image-1440\"\n\t\t/>\n\t</figure>\n\t", 29 31 "innerContent": [ 30 "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img src=\"http://google.com/hi.png\" alt=\"Image gallery image\"/>\n\t</figure>\n\t"32 "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img\n\t\t\tsrc=\"https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580\"\n\t\t\talt=\"Image gallery image\"\n\t\t\tclass=\"wp-image-1440\"\n\t\t/>\n\t</figure>\n\t" 31 33 ] 32 34 } 33 35 ], 34 "innerHTML": "\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped columns-2\">\n\t\n\n\t\n</figure>\n",36 "innerHTML": "\n<figure\n\tclass=\"wp-block-gallery has-nested-images columns-default is-cropped columns-2\"\n>\n\t\n\n\t\n</figure>\n", 35 37 "innerContent": [ 36 "\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped columns-2\">\n\t",38 "\n<figure\n\tclass=\"wp-block-gallery has-nested-images columns-default is-cropped columns-2\"\n>\n\t", 37 39 null, 38 40 "\n\n\t", … … 41 43 ] 42 44 }, 43 { 44 "blockName": null, 45 "attrs": {}, 46 "innerBlocks": [], 47 "innerHTML": "\n", 48 "innerContent": [ 49 "\n" 50 ] 51 } 45 { 46 "blockName": null, 47 "attrs": {}, 48 "innerBlocks": [], 49 "innerHTML": "\n", 50 "innerContent": [ "\n" ] 51 } 52 52 53 ] -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery.serialized.html
r53261 r55471 1 1 <!-- wp:gallery {"linkTo":"none","className":"columns-2"} --> 2 <figure class="wp-block-gallery has-nested-images columns-default is-cropped columns-2"><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="Image gallery image" /></figure><!-- /wp:image --><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="http://google.com/hi.png" alt="Image gallery image" /></figure><!-- /wp:image --></figure> 2 <figure class="wp-block-gallery has-nested-images columns-default is-cropped columns-2"><!-- wp:image {"id":1421,"sizeSlug":"large","linkDestination":"none"} --> 3 <figure class="wp-block-image size-large"><img src="https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190" alt="Image gallery image" class="wp-image-1421"/></figure> 4 <!-- /wp:image --> 5 6 <!-- wp:image {"id":1440,"sizeSlug":"large","linkDestination":"none"} --> 7 <figure class="wp-block-image size-large"><img src="https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580" alt="Image gallery image" class="wp-image-1440"/></figure> 8 <!-- /wp:image --></figure> 3 9 <!-- /wp:gallery --> -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery.server.html
r55282 r55471 1 1 2 <figure class="wp-block-gallery has-nested-images columns-default is-cropped columns-2 wp-block-gallery-1 is-layout-flex"> 3 2 <figure 3 class="wp-block-gallery has-nested-images columns-default is-cropped columns-2 wp-block-gallery-1 is-layout-flex" 4 > 5 4 6 <figure class="wp-block-image size-large"> 5 <img src="https://cldup.com/uuUqE_dXzy.jpg" alt="Image gallery image" /> 7 <img data-id="1421" 8 src="https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190" 9 alt="Image gallery image" 10 class="wp-image-1421" 11 /> 6 12 </figure> 7 8 13 9 14 15 10 16 <figure class="wp-block-image size-large"> 11 <img src="http://google.com/hi.png" alt="Image gallery image" /> 17 <img data-id="1440" 18 src="https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580" 19 alt="Image gallery image" 20 class="wp-image-1440" 21 /> 12 22 </figure> 13 23 14 24 </figure> 15 25 -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery__columns.html
r53261 r55471 1 <!-- wp:gallery {" linkTo":"none","className":"columns-1"} -->2 <figure class="wp-block-gallery has-nested-images is-cropped columns-1">3 <!-- wp:image {" sizeSlug":"large","linkDestination":"none"} -->1 <!-- wp:gallery {"columns":1,"linkTo":"none"} --> 2 <figure class="wp-block-gallery has-nested-images columns-1 is-cropped"> 3 <!-- wp:image {"id":1421,"sizeSlug":"large","linkDestination":"none","inheritedAttributes":{"linkDestination":true,"linkTarget":true,"sizeSlug":true}} --> 4 4 <figure class="wp-block-image size-large"> 5 <img src="https://cldup.com/uuUqE_dXzy.jpg" alt="Image gallery image" /> 5 <img 6 src="https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190" 7 alt="Image gallery image" 8 class="wp-image-1421" 9 /> 6 10 </figure> 7 11 <!-- /wp:image --> 8 12 9 <!-- wp:image {" sizeSlug":"large","linkDestination":"none"} -->13 <!-- wp:image {"id":1440,"sizeSlug":"large","linkDestination":"none","inheritedAttributes":{"linkDestination":true,"linkTarget":true,"sizeSlug":true}} --> 10 14 <figure class="wp-block-image size-large"> 11 <img src="http://google.com/hi.png" alt="Image gallery image" /> 15 <img 16 src="https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580" 17 alt="Image gallery image" 18 class="wp-image-1440" 19 /> 12 20 </figure> 13 21 <!-- /wp:image --> -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery__columns.json
r53261 r55471 7 7 "ids": [], 8 8 "shortCodeTransforms": [], 9 "columns": 1, 9 10 "caption": "", 10 11 "imageCrop": true, … … 12 13 "linkTo": "none", 13 14 "sizeSlug": "large", 14 "allowResize": false, 15 "className": "columns-1", 16 "columns": 1 15 "allowResize": false 17 16 }, 18 17 "innerBlocks": [ … … 21 20 "isValid": true, 22 21 "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", 24 23 "alt": "Image gallery image", 25 24 "caption": "", 25 "id": 1421, 26 26 "sizeSlug": "large", 27 27 "linkDestination": "none" … … 33 33 "isValid": true, 34 34 "attributes": { 35 "url": "http ://google.com/hi.png",35 "url": "https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580", 36 36 "alt": "Image gallery image", 37 37 "caption": "", 38 "id": 1440, 38 39 "sizeSlug": "large", 39 40 "linkDestination": "none" -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery__columns.parsed.json
r53261 r55471 3 3 "blockName": "core/gallery", 4 4 "attrs": { 5 " linkTo": "none",6 " className": "columns-1"5 "columns": 1, 6 "linkTo": "none" 7 7 }, 8 8 "innerBlocks": [ … … 10 10 "blockName": "core/image", 11 11 "attrs": { 12 "id": 1421, 12 13 "sizeSlug": "large", 13 "linkDestination": "none" 14 "linkDestination": "none", 15 "inheritedAttributes": { 16 "linkDestination": true, 17 "linkTarget": true, 18 "sizeSlug": true 19 } 14 20 }, 15 21 "innerBlocks": [], 16 "innerHTML": "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"Image gallery image\"/>\n\t</figure>\n\t",22 "innerHTML": "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img\n\t\t\tsrc=\"https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190\"\n\t\t\talt=\"Image gallery image\"\n\t\t\tclass=\"wp-image-1421\"\n\t\t/>\n\t</figure>\n\t", 17 23 "innerContent": [ 18 "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"Image gallery image\"/>\n\t</figure>\n\t"24 "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img\n\t\t\tsrc=\"https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190\"\n\t\t\talt=\"Image gallery image\"\n\t\t\tclass=\"wp-image-1421\"\n\t\t/>\n\t</figure>\n\t" 19 25 ] 20 26 }, … … 22 28 "blockName": "core/image", 23 29 "attrs": { 30 "id": 1440, 24 31 "sizeSlug": "large", 25 "linkDestination": "none" 32 "linkDestination": "none", 33 "inheritedAttributes": { 34 "linkDestination": true, 35 "linkTarget": true, 36 "sizeSlug": true 37 } 26 38 }, 27 39 "innerBlocks": [], 28 "innerHTML": "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img src=\"http://google.com/hi.png\" alt=\"Image gallery image\"/>\n\t</figure>\n\t",40 "innerHTML": "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img\n\t\t\tsrc=\"https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580\"\n\t\t\talt=\"Image gallery image\"\n\t\t\tclass=\"wp-image-1440\"\n\t\t/>\n\t</figure>\n\t", 29 41 "innerContent": [ 30 "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img src=\"http://google.com/hi.png\" alt=\"Image gallery image\"/>\n\t</figure>\n\t"42 "\n\t<figure class=\"wp-block-image size-large\">\n\t\t<img\n\t\t\tsrc=\"https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580\"\n\t\t\talt=\"Image gallery image\"\n\t\t\tclass=\"wp-image-1440\"\n\t\t/>\n\t</figure>\n\t" 31 43 ] 32 44 } 33 45 ], 34 "innerHTML": "\n<figure class=\"wp-block-gallery has-nested-images is-cropped columns-1\">\n\t\n\n\t\n</figure>\n",46 "innerHTML": "\n<figure class=\"wp-block-gallery has-nested-images columns-1 is-cropped\">\n\t\n\n\t\n</figure>\n", 35 47 "innerContent": [ 36 "\n<figure class=\"wp-block-gallery has-nested-images is-cropped columns-1\">\n\t",48 "\n<figure class=\"wp-block-gallery has-nested-images columns-1 is-cropped\">\n\t", 37 49 null, 38 50 "\n\n\t", … … 41 53 ] 42 54 }, 43 { 44 "blockName": null, 45 "attrs": {}, 46 "innerBlocks": [], 47 "innerHTML": "\n", 48 "innerContent": [ 49 "\n" 50 ] 51 } 55 { 56 "blockName": null, 57 "attrs": {}, 58 "innerBlocks": [], 59 "innerHTML": "\n", 60 "innerContent": [ "\n" ] 61 } 52 62 ] -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery__columns.serialized.html
r53261 r55471 1 <!-- wp:gallery {"linkTo":"none","className":"columns-1"} --> 2 <figure class="wp-block-gallery has-nested-images is-cropped columns-1"><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="Image gallery image" /></figure><!-- /wp:image --><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="http://google.com/hi.png" alt="Image gallery image" /></figure><!-- /wp:image --></figure> 1 <!-- wp:gallery {"columns":1,"linkTo":"none"} --> 2 <figure class="wp-block-gallery has-nested-images columns-1 is-cropped"><!-- wp:image {"id":1421,"sizeSlug":"large","linkDestination":"none"} --> 3 <figure class="wp-block-image size-large"><img src="https://sergioestevaofolio.files.wordpress.com/2016/09/cropped-img_9054-1.jpg?w=190" alt="Image gallery image" class="wp-image-1421"/></figure> 4 <!-- /wp:image --> 5 6 <!-- wp:image {"id":1440,"sizeSlug":"large","linkDestination":"none"} --> 7 <figure class="wp-block-image size-large"><img src="https://sergioestevaofolio.files.wordpress.com/2017/09/cropped-l1001498-1.jpg?w=580" alt="Image gallery image" class="wp-image-1440"/></figure> 8 <!-- /wp:image --></figure> 3 9 <!-- /wp:gallery --> -
trunk/tests/phpunit/data/blocks/fixtures/core__gallery__columns.server.html
r55282 r55471 1 1 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"> 4 3 <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 /> 6 9 </figure> 7 8 9 10 10 <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 /> 12 16 </figure> 13 14 17 </figure> 15 -
trunk/tests/phpunit/tests/blocks/render.php
r55457 r55471 228 228 $expected_html = self::strip_r( file_get_contents( $server_html_path ) ); 229 229 230 // Convert HTML to be white space insensitive. 231 $normalized_html = preg_replace( '/(\s+$)/m', '', $normalized_html ); 232 $expected_html = preg_replace( '/(\s+$)/m', '', $expected_html ); 233 230 234 $this->assertSame( 231 235 $expected_html,
Note: See TracChangeset
for help on using the changeset viewer.