Skip to content

Commit

Permalink
Fix test_amp_get_content_sanitizers for added allow_transient_caching
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Mar 19, 2020
1 parent 164dac2 commit d28a5ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/php/test-amp-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ public function test_amp_get_content_sanitizers() {
add_theme_support( AMP_Theme_Support::SLUG );
$handlers = amp_get_content_sanitizers();
$this->assertArrayHasKey( 'AMP_Style_Sanitizer', $handlers );
unset( $handlers['AMP_Style_Sanitizer']['allow_transient_caching'] ); // Remove item added after filter applied.
$this->assertEquals( 'amp_content_sanitizers', $this->last_filter_call['current_filter'] );
$this->assertEquals( $handlers, $this->last_filter_call['args'][0] );
$handler_classes = array_keys( $handlers );
Expand All @@ -834,6 +835,7 @@ public function test_amp_get_content_sanitizers() {
$this->last_filter_call = null;
remove_theme_support( AMP_Theme_Support::SLUG );
$handlers = amp_get_content_sanitizers( $post );
unset( $handlers['AMP_Style_Sanitizer']['allow_transient_caching'] ); // Remove item added after filter applied.
$this->assertArrayHasKey( 'AMP_Style_Sanitizer', $handlers );
$this->assertEquals( 'amp_content_sanitizers', $this->last_filter_call['current_filter'] );
$this->assertEquals( $handlers, $this->last_filter_call['args'][0] );
Expand Down

0 comments on commit d28a5ef

Please sign in to comment.