r106995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106994‎ | r106995 | r106996 >
Date:22:22, 21 December 2011
Author:raindrift
Status:ok
Tags:
Comment:
changed instances of sample.com to example.com per RFC 2606
Modified paths:
  • /trunk/phase3/tests/jasmine/spec/mediawiki.Uri.spec.js (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/api/ApiTestCase.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/api/ApiTestUser.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/filerepo/StoreBatchTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/jasmine/spec/mediawiki.Uri.spec.js
@@ -93,7 +93,7 @@
9494 } );
9595
9696 describe( "should handle multiple value query args (overrideKeys on)", function() {
97 - var uri = new mw.Uri( 'http://www.sample.com/dir/?m=foo&m=bar&n=1', { overrideKeys: true } );
 97+ var uri = new mw.Uri( 'http://www.example.com/dir/?m=foo&m=bar&n=1', { overrideKeys: true } );
9898 it ( "should parse with multiple values", function() {
9999 expect( uri.query.m ).toEqual( 'bar' );
100100 expect( uri.query.n ).toEqual( '1' );
@@ -102,12 +102,12 @@
103103 uri.query.n = [ "x", "y", "z" ];
104104 expect( uri.toString() ).toContain( 'm=bar' );
105105 expect( uri.toString() ).toContain( 'n=x&n=y&n=z' );
106 - expect( uri.toString().length ).toEqual( 'http://www.sample.com/dir/?m=bar&n=x&n=y&n=z'.length );
 106+ expect( uri.toString().length ).toEqual( 'http://www.example.com/dir/?m=bar&n=x&n=y&n=z'.length );
107107 } );
108108 } );
109109
110110 describe( "should handle multiple value query args (overrideKeys off)", function() {
111 - var uri = new mw.Uri( 'http://www.sample.com/dir/?m=foo&m=bar&n=1', { overrideKeys: false } );
 111+ var uri = new mw.Uri( 'http://www.example.com/dir/?m=foo&m=bar&n=1', { overrideKeys: false } );
112112 it ( "should parse with multiple values", function() {
113113 expect( uri.query.m.length ).toEqual( 2 );
114114 expect( uri.query.m[0] ).toEqual( 'foo' );
@@ -118,25 +118,25 @@
119119 uri.query.n = [ "x", "y", "z" ];
120120 expect( uri.toString() ).toContain( 'm=foo&m=bar' );
121121 expect( uri.toString() ).toContain( 'n=x&n=y&n=z' );
122 - expect( uri.toString().length ).toEqual( 'http://www.sample.com/dir/?m=foo&m=bar&n=x&n=y&n=z'.length );
 122+ expect( uri.toString().length ).toEqual( 'http://www.example.com/dir/?m=foo&m=bar&n=x&n=y&n=z'.length );
123123 } );
124124 it ( "should be okay with removing values", function() {
125125 uri.query.m.splice( 0, 1 );
126126 delete uri.query.n;
127 - expect( uri.toString() ).toEqual( 'http://www.sample.com/dir/?m=bar' );
 127+ expect( uri.toString() ).toEqual( 'http://www.example.com/dir/?m=bar' );
128128 uri.query.m.splice( 0, 1 );
129 - expect( uri.toString() ).toEqual( 'http://www.sample.com/dir/' );
 129+ expect( uri.toString() ).toEqual( 'http://www.example.com/dir/' );
130130 } );
131131 } );
132132
133133 describe( "should deal with an all-dressed URI with everything", function() {
134 - var uri = new mw.Uri( 'http://auth@www.sample.com:81/dir/dir.2/index.htm?q1=0&&test1&test2=value+%28escaped%29#top' );
 134+ var uri = new mw.Uri( 'http://auth@www.example.com:81/dir/dir.2/index.htm?q1=0&&test1&test2=value+%28escaped%29#top' );
135135
136136 it( "should have basic object properties", function() {
137137 expect( uri.protocol ).toEqual( 'http' );
138138 expect( uri.user ).toEqual( 'auth' );
139139 expect( uri.password ).not.toBeDefined();
140 - expect( uri.host ).toEqual( 'www.sample.com' );
 140+ expect( uri.host ).toEqual( 'www.example.com' );
141141 expect( uri.port ).toEqual( '81' );
142142 expect( uri.path ).toEqual( '/dir/dir.2/index.htm' );
143143 expect( uri.query ).toEqual( { q1: '0', test1: null, test2: 'value (escaped)' } );
@@ -149,11 +149,11 @@
150150 } );
151151
152152 it( "should have authority equal to auth@hostport", function() {
153 - expect( uri.getAuthority() ).toEqual( 'auth@www.sample.com:81' );
 153+ expect( uri.getAuthority() ).toEqual( 'auth@www.example.com:81' );
154154 } );
155155
156156 it( "should have hostport equal to host:port", function() {
157 - expect( uri.getHostPort() ).toEqual( 'www.sample.com:81' );
 157+ expect( uri.getHostPort() ).toEqual( 'www.example.com:81' );
158158 } );
159159
160160 it( "should have query string which contains all components", function() {
Index: trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php
@@ -19,13 +19,13 @@
2020 'sysop' => new ApiTestUser(
2121 'Uploadstashtestsysop',
2222 'Upload Stash Test Sysop',
23 - 'upload_stash_test_sysop@sample.com',
 23+ 'upload_stash_test_sysop@example.com',
2424 array( 'sysop' )
2525 ),
2626 'uploader' => new ApiTestUser(
2727 'Uploadstashtestuser',
2828 'Upload Stash Test User',
29 - 'upload_stash_test_user@sample.com',
 29+ 'upload_stash_test_user@example.com',
3030 array()
3131 )
3232 );
Index: trunk/phase3/tests/phpunit/includes/filerepo/StoreBatchTest.php
@@ -14,13 +14,13 @@
1515 'sysop' => new ApiTestUser(
1616 'Uploadstashtestsysop',
1717 'Upload Stash Test Sysop',
18 - 'upload_stash_test_sysop@sample.com',
 18+ 'upload_stash_test_sysop@example.com',
1919 array( 'sysop' )
2020 ),
2121 'uploader' => new ApiTestUser(
2222 'Uploadstashtestuser',
2323 'Upload Stash Test User',
24 - 'upload_stash_test_user@sample.com',
 24+ 'upload_stash_test_user@example.com',
2525 array()
2626 )
2727 );
Index: trunk/phase3/tests/phpunit/includes/api/ApiTestCase.php
@@ -26,13 +26,13 @@
2727 'sysop' => new ApiTestUser(
2828 'Apitestsysop',
2929 'Api Test Sysop',
30 - 'api_test_sysop@sample.com',
 30+ 'api_test_sysop@example.com',
3131 array( 'sysop' )
3232 ),
3333 'uploader' => new ApiTestUser(
3434 'Apitestuser',
3535 'Api Test User',
36 - 'api_test_user@sample.com',
 36+ 'api_test_user@example.com',
3737 array()
3838 )
3939 );
Index: trunk/phase3/tests/phpunit/includes/api/ApiTestUser.php
@@ -8,7 +8,7 @@
99 public $groups;
1010 public $user;
1111
12 - function __construct( $username, $realname = 'Real Name', $email = 'sample@sample.com', $groups = array() ) {
 12+ function __construct( $username, $realname = 'Real Name', $email = 'sample@example.com', $groups = array() ) {
1313 $this->username = $username;
1414 $this->realname = $realname;
1515 $this->email = $email;

Status & tagging log