| @@ 1108-1117 (lines=10) @@ | ||
| 1105 | /** |
|
| 1106 | * @ticket 12235 |
|
| 1107 | */ |
|
| 1108 | function test_wp_get_attachment_caption_empty() |
|
| 1109 | { |
|
| 1110 | $post_id = self::factory()->post->create(); |
|
| 1111 | $attachment_id = self::factory()->attachment->create_object( |
|
| 1112 | $this->img_name, $post_id, array( |
|
| 1113 | 'post_mime_type' => 'image/jpeg', |
|
| 1114 | 'post_type' => 'attachment', |
|
| 1115 | 'post_excerpt' => '', |
|
| 1116 | ) |
|
| 1117 | ); |
|
| 1118 | ||
| 1119 | $this->assertEquals('', wp_get_attachment_caption($attachment_id)); |
|
| 1120 | } |
|
| @@ 107-118 (lines=12) @@ | ||
| 104 | /** |
|
| 105 | * @ticket 12235 |
|
| 106 | */ |
|
| 107 | function test_get_the_post_thumbnail_caption_empty() |
|
| 108 | { |
|
| 109 | $post_id = self::factory()->post->create(); |
|
| 110 | $attachment_id = self::factory()->attachment->create_object( |
|
| 111 | 'image.jpg', $post_id, array( |
|
| 112 | 'post_mime_type' => 'image/jpeg', |
|
| 113 | 'post_type' => 'attachment', |
|
| 114 | 'post_excerpt' => '', |
|
| 115 | ) |
|
| 116 | ); |
|
| 117 | ||
| 118 | set_post_thumbnail($post_id, $attachment_id); |
|
| 119 | ||
| 120 | $this->assertEquals('', get_the_post_thumbnail_caption($post_id)); |
|
| 121 | } |
|