Use WP_TESTS_DOMAIN
where it should be used in tests in place of hard-coded uses of example.org
.
Also corrects a test value in the data provider for `Tests_Sanitize_Option::test_sanitize_option()` which was only consequentially passing. Fixes #34000 git-svn-id: https://develop.svn.wordpress.org/trunk@34519 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b415937e4a
commit
c5a336d664
@ -40,7 +40,7 @@ class Tests_Sanitize_Option extends WP_UnitTestCase {
|
||||
array( 'siteurl', 'http://example.org', 'http://example.org' ),
|
||||
array( 'siteurl', 'http://example.org/subdir', 'http://example.org/subdir' ),
|
||||
array( 'siteurl', get_option( 'siteurl' ), '' ),
|
||||
array( 'home', 'http://example.org', 'example.org' ),
|
||||
array( 'home', 'http://example.org', 'http://example.org' ),
|
||||
array( 'home', 'https://example.org', 'https://example.org' ),
|
||||
array( 'home', 'http://localhost:8000', 'http://localhost:8000' ),
|
||||
array( 'home', get_option( 'home' ), '' ),
|
||||
|
@ -17,7 +17,7 @@ class Tests_Term_GetEditTermLink extends WP_UnitTestCase {
|
||||
) );
|
||||
|
||||
$actual = get_edit_term_link( $term1, 'wptests_tax' );
|
||||
$expected = 'http://example.org/wp-admin/edit-tags.php?action=edit&taxonomy=wptests_tax&tag_ID=' . $term1 . '&post_type=post';
|
||||
$expected = 'http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-tags.php?action=edit&taxonomy=wptests_tax&tag_ID=' . $term1 . '&post_type=post';
|
||||
$this->assertEquals( $expected, $actual );
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ class Tests_WP_Generate_Tag_Cloud extends WP_UnitTestCase {
|
||||
'number' => 1,
|
||||
'hide_empty' => false,
|
||||
),
|
||||
"<a href='http://example.org/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a>",
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a>",
|
||||
array(
|
||||
'hide_empty' => false,
|
||||
),
|
||||
@ -107,7 +107,7 @@ class Tests_WP_Generate_Tag_Cloud extends WP_UnitTestCase {
|
||||
'hide_empty' => false,
|
||||
),
|
||||
array(
|
||||
"<a href='http://example.org/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a>",
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a>",
|
||||
),
|
||||
array(
|
||||
'hide_empty' => false,
|
||||
@ -122,7 +122,7 @@ class Tests_WP_Generate_Tag_Cloud extends WP_UnitTestCase {
|
||||
'number' => 1,
|
||||
'hide_empty' => false,
|
||||
),
|
||||
"<ul class='wp-tag-cloud'>\n\t<li><a href='http://example.org/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a></li>\n</ul>\n",
|
||||
"<ul class='wp-tag-cloud'>\n\t<li><a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a></li>\n</ul>\n",
|
||||
array(
|
||||
'hide_empty' => false,
|
||||
'format' => 'list',
|
||||
@ -135,10 +135,10 @@ class Tests_WP_Generate_Tag_Cloud extends WP_UnitTestCase {
|
||||
'number' => 4,
|
||||
'hide_empty' => false,
|
||||
),
|
||||
"<a href='http://example.org/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a>\n".
|
||||
"<a href='http://example.org/?tag=term-2' class='tag-link-1' title='0 topics' style='font-size: 8pt;'>Term 2</a>\n".
|
||||
"<a href='http://example.org/?tag=term-3' class='tag-link-2' title='0 topics' style='font-size: 8pt;'>Term 3</a>\n".
|
||||
"<a href='http://example.org/?tag=term-4' class='tag-link-3' title='0 topics' style='font-size: 8pt;'>Term 4</a>",
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a>\n".
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-2' class='tag-link-1' title='0 topics' style='font-size: 8pt;'>Term 2</a>\n".
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-3' class='tag-link-2' title='0 topics' style='font-size: 8pt;'>Term 3</a>\n".
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-4' class='tag-link-3' title='0 topics' style='font-size: 8pt;'>Term 4</a>",
|
||||
array(
|
||||
'hide_empty' => false,
|
||||
),
|
||||
@ -151,10 +151,10 @@ class Tests_WP_Generate_Tag_Cloud extends WP_UnitTestCase {
|
||||
'hide_empty' => false,
|
||||
),
|
||||
"<ul class='wp-tag-cloud'>\n\t<li>".
|
||||
"<a href='http://example.org/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a></li>\n\t<li>".
|
||||
"<a href='http://example.org/?tag=term-2' class='tag-link-1' title='0 topics' style='font-size: 8pt;'>Term 2</a></li>\n\t<li>".
|
||||
"<a href='http://example.org/?tag=term-3' class='tag-link-2' title='0 topics' style='font-size: 8pt;'>Term 3</a></li>\n\t<li>".
|
||||
"<a href='http://example.org/?tag=term-4' class='tag-link-3' title='0 topics' style='font-size: 8pt;'>Term 4</a>".
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-1' class='tag-link-0' title='0 topics' style='font-size: 8pt;'>Term 1</a></li>\n\t<li>".
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-2' class='tag-link-1' title='0 topics' style='font-size: 8pt;'>Term 2</a></li>\n\t<li>".
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-3' class='tag-link-2' title='0 topics' style='font-size: 8pt;'>Term 3</a></li>\n\t<li>".
|
||||
"<a href='http://" . WP_TESTS_DOMAIN . "/?tag=term-4' class='tag-link-3' title='0 topics' style='font-size: 8pt;'>Term 4</a>".
|
||||
"</li>\n</ul>\n",
|
||||
array(
|
||||
'hide_empty' => false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user