changed instances of sample.com to example.com per RFC 2606
authorIan Baker <raindrift@users.mediawiki.org>
Wed, 21 Dec 2011 22:22:01 +0000 (22:22 +0000)
committerIan Baker <raindrift@users.mediawiki.org>
Wed, 21 Dec 2011 22:22:01 +0000 (22:22 +0000)
tests/jasmine/spec/mediawiki.Uri.spec.js
tests/phpunit/includes/api/ApiTestCase.php
tests/phpunit/includes/api/ApiTestUser.php
tests/phpunit/includes/filerepo/StoreBatchTest.php
tests/phpunit/includes/upload/UploadStashTest.php

index 2ed1fe4..721ccb3 100644 (file)
@@ -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' );
                                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' );
                                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)' } );
                                } );
 
                                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() { 
index 40b85d4..e23ab70 100644 (file)
@@ -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()
                        )
                );
index df60682..8d5f61a 100644 (file)
@@ -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;
index 7979769..1686e0e 100644 (file)
@@ -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()
                        )
                );
index 4aa64af..03f1310 100644 (file)
@@ -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()
                        )
                );