- Timestamp:
- 07/21/2020 11:12:22 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/widgets/media-image-widget.php
r48464 r48557 586 586 $this->assertContains( 'class="wp-caption alignnone"', $output ); 587 587 $this->assertContains( '<p class="wp-caption-text">Custom caption</p>', $output ); 588 589 // Attachments with custom sizes can render captions. 590 ob_start(); 591 $widget->render_media( 592 array( 593 'attachment_id' => $attachment_id, 594 'size' => 'custom', 595 'width' => '300', 596 'height' => '200', 597 'caption' => 'Caption for an image with custom size', 598 ) 599 ); 600 $output = ob_get_clean(); 601 $this->assertContains( 'style="width: 310px"', $output ); 602 $this->assertContains( '<p class="wp-caption-text">Caption for an image with custom size</p>', $output ); 588 603 } 589 604
Note: See TracChangeset
for help on using the changeset viewer.