We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aff570 commit de106d9Copy full SHA for de106d9
plugins/auto-sizes/tests/test-improve-calculate-sizes.php
@@ -1487,6 +1487,19 @@ public static function data_post_featured_image_block_alignment(): array {
1487
);
1488
}
1489
1490
+ /**
1491
+ * Test that auto_sizes_get_featured_image_attachment_id() returns 0 when post_id is not found.
1492
+ *
1493
+ * @covers ::auto_sizes_get_featured_image_attachment_id
1494
+ */
1495
+ public function test_auto_sizes_get_featured_image_attachment_id_returns_zero_for_zero_post_id(): void {
1496
+ $this->assertSame(
1497
+ 0,
1498
+ auto_sizes_get_featured_image_attachment_id( 0 ),
1499
+ 'Should return 0 when post_id is not found.'
1500
+ );
1501
+ }
1502
+
1503
/**
1504
* Filter the theme.json data to include relative layout sizes.
1505
*
0 commit comments