Skip to content

Commit 3a51aed

Browse files
Skip failed tests for WordPress versions lower than 6.8
1 parent 82d7364 commit 3a51aed

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

plugins/auto-sizes/tests/test-improve-calculate-sizes.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,11 @@ public function data_image_block_with_column_block(): array {
783783
* @param string $expected Expected output.
784784
*/
785785
public function test_image_block_with_two_equal_column_block( string $ancestor_block_alignment, string $image_block_alignment, string $expected ): void {
786+
// Skip test for WordPress versions below 6.8.
787+
if ( version_compare( get_bloginfo( 'version' ), '6.8', '<' ) ) {
788+
$this->markTestSkipped( 'This test requires WordPress 6.8 or higher.' );
789+
}
790+
786791
$block_content = $this->get_columns_block_markup(
787792
$this->get_image_block_markup( self::$image_id, 'large', $image_block_alignment ),
788793
array(
@@ -914,6 +919,11 @@ public function data_image_block_with_two_equal_column_block(): array {
914919
* @param string $expected Expected output.
915920
*/
916921
public function test_image_block_with_two_different_width_column_block( string $ancestor_block_alignment, string $image_block_alignment, string $expected ): void {
922+
// Skip test for WordPress versions below 6.8.
923+
if ( version_compare( get_bloginfo( 'version' ), '6.8', '<' ) ) {
924+
$this->markTestSkipped( 'This test requires WordPress 6.8 or higher.' );
925+
}
926+
917927
$block_content = $this->get_columns_block_markup(
918928
$this->get_image_block_markup( self::$image_id, 'large', $image_block_alignment ),
919929
array(
@@ -1046,6 +1056,11 @@ public function data_image_block_with_two_different_width_column_block(): array
10461056
* @param string $expected Expected output.
10471057
*/
10481058
public function test_image_block_with_parent_columns_and_its_parent_group_block( string $group_block_alignment, string $columns_block_alignment, string $image_block_alignment, string $expected ): void {
1059+
// Skip test for WordPress versions below 6.8.
1060+
if ( version_compare( get_bloginfo( 'version' ), '6.8', '<' ) ) {
1061+
$this->markTestSkipped( 'This test requires WordPress 6.8 or higher.' );
1062+
}
1063+
10491064
$block_content = $this->get_group_block_markup(
10501065
$this->get_columns_block_markup(
10511066
$this->get_image_block_markup( self::$image_id, 'large', $image_block_alignment ),

0 commit comments

Comments
 (0)