Skip to content

Commit ef84089

Browse files
author
Alessandro Lioce
committed
Customizer: Add tests for unsanitized_post_values with excluded data options.
1 parent 5ce19d6 commit ef84089

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/phpunit/tests/customize/manager.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,6 +2453,15 @@ public function test_unsanitized_post_values_with_changeset_and_stashed_theme_mo
24532453
'exclude_changeset' => true,
24542454
)
24552455
);
2456+
$this->assertEmpty( $values );
2457+
2458+
$manager->add_setting( 'background_color' );
2459+
$values = $manager->unsanitized_post_values(
2460+
array(
2461+
'exclude_post_data' => true,
2462+
'exclude_changeset' => true,
2463+
)
2464+
);
24562465
$this->assertNotEmpty( $values );
24572466
$this->assertArrayHasKey( 'background_color', $values );
24582467
$this->assertSame( '#000000', $values['background_color'] );

0 commit comments

Comments
 (0)