Skip to content

Commit

Permalink
Fix test_init_customizer to account for Gutenberg being active
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Dec 13, 2021
1 parent ccb9090 commit 6dbd043
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/php/test-class-amp-customizer-design-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @package AMP
*/

use AmpProject\AmpWP\DependencySupport;
use AmpProject\AmpWP\Option;
use AmpProject\AmpWP\Tests\TestCase;

Expand Down Expand Up @@ -112,6 +113,8 @@ public function test_init_customizer( $has_dependency_support ) {
} else {
$GLOBALS['wp_version'] = '5.5';
}
$has_dependency_support = ( new DependencySupport() )->has_support(); // To account for Gutenberg being active.

AMP_Customizer_Design_Settings::init_customizer();
$this->assertEquals( $has_dependency_support ? 10 : false, has_action( 'amp_customizer_register_settings', [ AMP_Customizer_Design_Settings::class, 'register_customizer_settings' ] ) );
$this->assertEquals( $has_dependency_support ? 10 : false, has_action( 'amp_customizer_register_ui', [ AMP_Customizer_Design_Settings::class, 'register_customizer_ui' ] ) );
Expand Down

0 comments on commit 6dbd043

Please sign in to comment.