Skip to content

Commit 9994c95

Browse files
committed
Build/Test Tools: Replace uses of test.com in tests and the local development environment with the more appropriate example.com which is intended for testing and examples.
See #63167 git-svn-id: https://develop.svn.wordpress.org/trunk@60250 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0d7274f commit 9994c95

5 files changed

Lines changed: 19 additions & 19 deletions

File tree

tests/e2e/specs/install.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ test.describe( 'WordPress installation process', () => {
5858
await page.getByLabel( 'Password', { exact: true } ).fill( '' );
5959
await page.getByLabel( 'Password', { exact: true } ).fill( 'password' );
6060
await page.getByLabel( /Confirm use of weak password/ ).check()
61-
await page.getByLabel( 'Your Email' ).fill( 'test@test.com' );
61+
await page.getByLabel( 'Your Email' ).fill( 'test@example.com' );
6262

6363
await page.getByRole( 'button', { name: 'Install WordPress' } ).click();
6464

tests/phpunit/tests/admin/wpPluginsListTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function set_up_before_class() {
5757
'role' => 'administrator',
5858
'user_login' => 'test_wp_plugins_list_table',
5959
'user_pass' => 'password',
60-
'user_email' => 'testadmin@test.com',
60+
'user_email' => 'testadmin@example.com',
6161
)
6262
);
6363
self::$original_s = $s;

tests/phpunit/tests/comment.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
2121
'role' => 'author',
2222
'user_login' => 'test_wp_user_get',
2323
'user_pass' => 'password',
24-
'user_email' => 'test@test.com',
24+
'user_email' => 'author@example.com',
2525
)
2626
);
2727

@@ -95,7 +95,7 @@ public function test_update_comment_from_privileged_user_by_privileged_user() {
9595
'comment_post_ID' => self::$post_id,
9696
'comment_author' => 'Author',
9797
'comment_author_url' => 'http://example.localhost/',
98-
'comment_author_email' => 'test@test.com',
98+
'comment_author_email' => 'author@example.com',
9999
'user_id' => $admin_id_1,
100100
'comment_content' => 'This is a comment',
101101
)
@@ -108,7 +108,7 @@ public function test_update_comment_from_privileged_user_by_privileged_user() {
108108
'role' => 'administrator',
109109
'user_login' => 'test_wp_admin_get',
110110
'user_pass' => 'password',
111-
'user_email' => 'testadmin@test.com',
111+
'user_email' => 'testadmin@example.com',
112112
)
113113
);
114114

@@ -139,7 +139,7 @@ public function test_update_comment_from_unprivileged_user_by_privileged_user()
139139
'comment_post_ID' => self::$post_id,
140140
'comment_author' => 'Author',
141141
'comment_author_url' => 'http://example.localhost/',
142-
'comment_author_email' => 'test@test.com',
142+
'comment_author_email' => 'author@example.com',
143143
'user_id' => self::$user_id,
144144
'comment_content' => '<a href="http://example.localhost/something.html">click</a>',
145145
)
@@ -152,7 +152,7 @@ public function test_update_comment_from_unprivileged_user_by_privileged_user()
152152
'role' => 'administrator',
153153
'user_login' => 'test_wp_admin_get',
154154
'user_pass' => 'password',
155-
'user_email' => 'testadmin@test.com',
155+
'user_email' => 'testadmin@example.com',
156156
)
157157
);
158158

@@ -1445,10 +1445,10 @@ public function try_sending_author_notification( $comment, $post ) {
14451445
// Post authors possibly notified when a comment is approved on their post.
14461446
wp_set_comment_status( $comment, 'approve' );
14471447

1448-
// Check to see if a notification email was sent to the post author `test@test.com`.
1448+
// Check to see if a notification email was sent to the post author `author@example.com`.
14491449
if ( isset( $GLOBALS['phpmailer']->mock_sent )
14501450
&& ! empty( $GLOBALS['phpmailer']->mock_sent )
1451-
&& 'test@test.com' === $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0]
1451+
&& 'author@example.com' === $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0]
14521452
) {
14531453
$email_sent_when_comment_approved = true;
14541454
} else {
@@ -1467,10 +1467,10 @@ public function try_sending_author_notification( $comment, $post ) {
14671467
);
14681468
wp_new_comment( $data );
14691469

1470-
// Check to see if a notification email was sent to the post author `test@test.com`.
1470+
// Check to see if a notification email was sent to the post author `author@example.com`.
14711471
if ( isset( $GLOBALS['phpmailer']->mock_sent ) &&
14721472
! empty( $GLOBALS['phpmailer']->mock_sent ) &&
1473-
'test@test.com' === $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0] ) {
1473+
'author@example.com' === $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0] ) {
14741474
$email_sent_when_comment_added = true;
14751475
reset_phpmailer_instance();
14761476
} else {

tests/phpunit/tests/user.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
4949
self::$user_ids[] = self::$admin_id;
5050
self::$editor_id = $factory->user->create(
5151
array(
52-
'user_email' => 'test@test.com',
52+
'user_email' => 'test@example.com',
5353
'role' => 'editor',
5454
)
5555
);
@@ -820,7 +820,7 @@ public function illegal_user_logins() {
820820
*/
821821
public function test_validate_username_string() {
822822
$this->assertTrue( validate_username( 'johndoe' ) );
823-
$this->assertTrue( validate_username( 'test@test.com' ) );
823+
$this->assertTrue( validate_username( 'test@example.com' ) );
824824
}
825825

826826
/**
@@ -1035,7 +1035,7 @@ public function test_wp_insert_user_should_reject_user_url_over_100_characters()
10351035
$u = wp_insert_user(
10361036
array(
10371037
'user_login' => 'test',
1038-
'user_email' => 'test@example.com',
1038+
'user_email' => 'urltest@example.com',
10391039
'user_pass' => 'password',
10401040
'user_url' => $user_url,
10411041
)
@@ -1256,7 +1256,7 @@ public function test_email_case() {
12561256
// Alter the case of the email address (which stays the same).
12571257
$userdata = array(
12581258
'ID' => self::$editor_id,
1259-
'user_email' => 'test@TEST.com',
1259+
'user_email' => 'test@EXAMPLE.com',
12601260
);
12611261
$update = wp_update_user( $userdata );
12621262

@@ -1270,7 +1270,7 @@ public function test_email_change() {
12701270
// Change the email address.
12711271
$userdata = array(
12721272
'ID' => self::$editor_id,
1273-
'user_email' => 'test2@test.com',
1273+
'user_email' => 'test2@example.com',
12741274
);
12751275
$update = wp_update_user( $userdata );
12761276

@@ -1279,7 +1279,7 @@ public function test_email_change() {
12791279

12801280
// Verify that the email address has been updated.
12811281
$user = get_userdata( self::$editor_id );
1282-
$this->assertSame( $user->user_email, 'test2@test.com' );
1282+
$this->assertSame( $user->user_email, 'test2@example.com' );
12831283
}
12841284

12851285
/**
@@ -1978,7 +1978,7 @@ public function test_edit_user_role_update() {
19781978
* @ticket 43547
19791979
*/
19801980
public function test_wp_user_personal_data_exporter_no_user() {
1981-
$actual = wp_user_personal_data_exporter( 'not-a-user-email@test.com' );
1981+
$actual = wp_user_personal_data_exporter( 'not-a-user-email@example.com' );
19821982

19831983
$expected = array(
19841984
'data' => array(),

tools/local-env/scripts/install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ wait_on( { resources: [ `tcp:localhost:${process.env.LOCAL_PORT}`] } )
4242
.then( () => {
4343
wp_cli( 'db reset --yes' );
4444
const installCommand = process.env.LOCAL_MULTISITE === 'true' ? 'multisite-install' : 'install';
45-
wp_cli( `core ${ installCommand } --title="WordPress Develop" --admin_user=admin --admin_password=password --admin_email=test@test.com --skip-email --url=http://localhost:${process.env.LOCAL_PORT}` );
45+
wp_cli( `core ${ installCommand } --title="WordPress Develop" --admin_user=admin --admin_password=password --admin_email=test@example.com --skip-email --url=http://localhost:${process.env.LOCAL_PORT}` );
4646
} );
4747

4848
/**

0 commit comments

Comments
 (0)