Options: Use strings in the test suite that follow community guidelines.

Also somewhat explain to future maintainers why this pairing of strings was chosen, besides this committer's musical preferences. Social opinions on cancer are fairly clear, as are commonly accepted definitions of profanity and family-friendly language.

Shout out to the close contender, which would have been particularly appropriate here: "You could be the king // But watch the queen conquer".

see #43207, #38176


git-svn-id: https://develop.svn.wordpress.org/trunk@42667 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2018-02-07 22:41:48 +00:00
parent b7c2dfb9ae
commit 05b37069a4
1 changed files with 7 additions and 5 deletions

View File

@ -47,11 +47,11 @@ class Tests_Option_Registration extends WP_UnitTestCase {
public function test_register_with_default() {
register_setting(
'test_group', 'test_default', array(
'default' => 'Fuck Cancer',
'default' => 'Got that Viper with them rally stripes',
)
);
$this->assertEquals( 'Fuck Cancer', get_option( 'test_default' ) );
$this->assertEquals( 'Got that Viper with them rally stripes', get_option( 'test_default' ) );
}
/**
@ -60,11 +60,13 @@ class Tests_Option_Registration extends WP_UnitTestCase {
public function test_register_with_default_override() {
register_setting(
'test_group', 'test_default', array(
'default' => 'Fuck Cancer',
'default' => 'Got that Viper with them rally stripes',
)
);
$this->assertEquals( 'Fuck Leukemia', get_option( 'test_default', 'Fuck Leukemia' ) );
// This set of tests/references (and a previous version) are in support of Viper007Bond.
// His Viper doesn't have rally stripes, but for the sake of the Big Tymers, we'll go with it.
$this->assertEquals( 'We the #1 Stunnas', get_option( 'test_default', 'We the #1 Stunnas' ) );
}
/**
@ -101,7 +103,7 @@ class Tests_Option_Registration extends WP_UnitTestCase {
public function test_unregister_setting_removes_default() {
register_setting(
'test_group', 'test_default', array(
'default' => 'Fuck Cancer',
'default' => 'Got that Viper with them rally stripes',
)
);