Skip to content

Commit

Permalink
Remove assertions that would break for WP < 6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Jul 2, 2024
1 parent f3ac539 commit f4a66f0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions phpunit/blocks/block-json-variations-filename-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,7 @@ public function test_register_block_type_from_metadata_with_variations_php_file(

$this->assertInstanceOf( 'WP_Block_Type', $result, 'The block was not registered' );

$this->assertIsCallable( $result->variation_callback, 'The variation callback hasn\'t been set' );
$expected_variations = require GUTENBERG_DIR_TESTFIXTURES . '/variations.php';
$this->assertSame(
$expected_variations,
call_user_func( $result->variation_callback ),
'The variation callback hasn\'t been set correctly'
);
$this->assertSame( $expected_variations, $result->variations, 'The block variations are incorrect' );
$this->assertSame( $expected_variations, $result->variations, "Block variations haven't been set correctly." );
}
}

0 comments on commit f4a66f0

Please sign in to comment.