From 77320e19944983f650894c6570429b2cb0514783 Mon Sep 17 00:00:00 2001 From: Ian Baker Date: Wed, 21 Dec 2011 22:22:01 +0000 Subject: [PATCH] changed instances of sample.com to example.com per RFC 2606 --- tests/jasmine/spec/mediawiki.Uri.spec.js | 20 +++++++++---------- tests/phpunit/includes/api/ApiTestCase.php | 4 ++-- tests/phpunit/includes/api/ApiTestUser.php | 2 +- .../includes/filerepo/StoreBatchTest.php | 4 ++-- .../includes/upload/UploadStashTest.php | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/jasmine/spec/mediawiki.Uri.spec.js b/tests/jasmine/spec/mediawiki.Uri.spec.js index 2ed1fe4e96..721ccb3801 100644 --- a/tests/jasmine/spec/mediawiki.Uri.spec.js +++ b/tests/jasmine/spec/mediawiki.Uri.spec.js @@ -93,7 +93,7 @@ } ); describe( "should handle multiple value query args (overrideKeys on)", function() { - var uri = new mw.Uri( 'http://www.sample.com/dir/?m=foo&m=bar&n=1', { overrideKeys: true } ); + var uri = new mw.Uri( 'http://www.example.com/dir/?m=foo&m=bar&n=1', { overrideKeys: true } ); it ( "should parse with multiple values", function() { expect( uri.query.m ).toEqual( 'bar' ); expect( uri.query.n ).toEqual( '1' ); @@ -102,12 +102,12 @@ uri.query.n = [ "x", "y", "z" ]; expect( uri.toString() ).toContain( 'm=bar' ); expect( uri.toString() ).toContain( 'n=x&n=y&n=z' ); - expect( uri.toString().length ).toEqual( 'http://www.sample.com/dir/?m=bar&n=x&n=y&n=z'.length ); + expect( uri.toString().length ).toEqual( 'http://www.example.com/dir/?m=bar&n=x&n=y&n=z'.length ); } ); } ); describe( "should handle multiple value query args (overrideKeys off)", function() { - var uri = new mw.Uri( 'http://www.sample.com/dir/?m=foo&m=bar&n=1', { overrideKeys: false } ); + var uri = new mw.Uri( 'http://www.example.com/dir/?m=foo&m=bar&n=1', { overrideKeys: false } ); it ( "should parse with multiple values", function() { expect( uri.query.m.length ).toEqual( 2 ); expect( uri.query.m[0] ).toEqual( 'foo' ); @@ -118,25 +118,25 @@ uri.query.n = [ "x", "y", "z" ]; expect( uri.toString() ).toContain( 'm=foo&m=bar' ); expect( uri.toString() ).toContain( 'n=x&n=y&n=z' ); - expect( uri.toString().length ).toEqual( 'http://www.sample.com/dir/?m=foo&m=bar&n=x&n=y&n=z'.length ); + expect( uri.toString().length ).toEqual( 'http://www.example.com/dir/?m=foo&m=bar&n=x&n=y&n=z'.length ); } ); it ( "should be okay with removing values", function() { uri.query.m.splice( 0, 1 ); delete uri.query.n; - expect( uri.toString() ).toEqual( 'http://www.sample.com/dir/?m=bar' ); + expect( uri.toString() ).toEqual( 'http://www.example.com/dir/?m=bar' ); uri.query.m.splice( 0, 1 ); - expect( uri.toString() ).toEqual( 'http://www.sample.com/dir/' ); + expect( uri.toString() ).toEqual( 'http://www.example.com/dir/' ); } ); } ); describe( "should deal with an all-dressed URI with everything", function() { - var uri = new mw.Uri( 'http://auth@www.sample.com:81/dir/dir.2/index.htm?q1=0&&test1&test2=value+%28escaped%29#top' ); + var uri = new mw.Uri( 'http://auth@www.example.com:81/dir/dir.2/index.htm?q1=0&&test1&test2=value+%28escaped%29#top' ); it( "should have basic object properties", function() { expect( uri.protocol ).toEqual( 'http' ); expect( uri.user ).toEqual( 'auth' ); expect( uri.password ).not.toBeDefined(); - expect( uri.host ).toEqual( 'www.sample.com' ); + expect( uri.host ).toEqual( 'www.example.com' ); expect( uri.port ).toEqual( '81' ); expect( uri.path ).toEqual( '/dir/dir.2/index.htm' ); expect( uri.query ).toEqual( { q1: '0', test1: null, test2: 'value (escaped)' } ); @@ -149,11 +149,11 @@ } ); it( "should have authority equal to auth@hostport", function() { - expect( uri.getAuthority() ).toEqual( 'auth@www.sample.com:81' ); + expect( uri.getAuthority() ).toEqual( 'auth@www.example.com:81' ); } ); it( "should have hostport equal to host:port", function() { - expect( uri.getHostPort() ).toEqual( 'www.sample.com:81' ); + expect( uri.getHostPort() ).toEqual( 'www.example.com:81' ); } ); it( "should have query string which contains all components", function() { diff --git a/tests/phpunit/includes/api/ApiTestCase.php b/tests/phpunit/includes/api/ApiTestCase.php index 40b85d45b0..e23ab70cff 100644 --- a/tests/phpunit/includes/api/ApiTestCase.php +++ b/tests/phpunit/includes/api/ApiTestCase.php @@ -26,13 +26,13 @@ abstract class ApiTestCase extends MediaWikiLangTestCase { 'sysop' => new ApiTestUser( 'Apitestsysop', 'Api Test Sysop', - 'api_test_sysop@sample.com', + 'api_test_sysop@example.com', array( 'sysop' ) ), 'uploader' => new ApiTestUser( 'Apitestuser', 'Api Test User', - 'api_test_user@sample.com', + 'api_test_user@example.com', array() ) ); diff --git a/tests/phpunit/includes/api/ApiTestUser.php b/tests/phpunit/includes/api/ApiTestUser.php index df60682f54..8d5f61a75f 100644 --- a/tests/phpunit/includes/api/ApiTestUser.php +++ b/tests/phpunit/includes/api/ApiTestUser.php @@ -8,7 +8,7 @@ class ApiTestUser { public $groups; public $user; - function __construct( $username, $realname = 'Real Name', $email = 'sample@sample.com', $groups = array() ) { + function __construct( $username, $realname = 'Real Name', $email = 'sample@example.com', $groups = array() ) { $this->username = $username; $this->realname = $realname; $this->email = $email; diff --git a/tests/phpunit/includes/filerepo/StoreBatchTest.php b/tests/phpunit/includes/filerepo/StoreBatchTest.php index 7979769d53..1686e0e455 100644 --- a/tests/phpunit/includes/filerepo/StoreBatchTest.php +++ b/tests/phpunit/includes/filerepo/StoreBatchTest.php @@ -14,13 +14,13 @@ class StoreBatchTest extends MediaWikiTestCase { 'sysop' => new ApiTestUser( 'Uploadstashtestsysop', 'Upload Stash Test Sysop', - 'upload_stash_test_sysop@sample.com', + 'upload_stash_test_sysop@example.com', array( 'sysop' ) ), 'uploader' => new ApiTestUser( 'Uploadstashtestuser', 'Upload Stash Test User', - 'upload_stash_test_user@sample.com', + 'upload_stash_test_user@example.com', array() ) ); diff --git a/tests/phpunit/includes/upload/UploadStashTest.php b/tests/phpunit/includes/upload/UploadStashTest.php index 4aa64afe7d..03f13101a8 100644 --- a/tests/phpunit/includes/upload/UploadStashTest.php +++ b/tests/phpunit/includes/upload/UploadStashTest.php @@ -19,13 +19,13 @@ class UploadStashTest extends MediaWikiTestCase { 'sysop' => new ApiTestUser( 'Uploadstashtestsysop', 'Upload Stash Test Sysop', - 'upload_stash_test_sysop@sample.com', + 'upload_stash_test_sysop@example.com', array( 'sysop' ) ), 'uploader' => new ApiTestUser( 'Uploadstashtestuser', 'Upload Stash Test User', - 'upload_stash_test_user@sample.com', + 'upload_stash_test_user@example.com', array() ) ); -- 2.20.1