MediaWiki  REL1_21
MediaWikiDifferentDatabaseAccountTestCase.php
Go to the documentation of this file.
00001 <?php
00026 require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
00027 
00033 class MediaWikiDifferentDatabaseAccountTestCase extends MediaWikiInstallationCommonFunction {
00034         function setUp() {
00035                 parent::setUp();
00036         }
00037 
00038         // Install Mediawiki using 'MySQL' database type.
00039         public function testDifferentDatabaseAccount() {
00040                 $databaseName = DB_NAME_PREFIX . "_dif_accounts";
00041 
00042                 // Navigate to the 'Database settings' page
00043                 parent::navigateDatabaseSettingsPage( $databaseName );
00044 
00045                 // Click on the 'Use the same account as for installation' check box
00046                 $this->click( "mysql__SameAccount" );
00047 
00048                 // Change the 'Database username'
00049                 $this->type( "mysql_wgDBuser", DB_WEB_USER );
00050 
00051                 // Enter 'Database password:'
00052                 $this->type( "mysql_wgDBpassword", DB_WEB_USER_PASSWORD );
00053 
00054                 // Select 'Create the account if it does not already exist' check box
00055                 $this->click( "mysql__CreateDBAccount" );
00056                 parent::clickContinueButton();
00057 
00058                 // 'Name' page
00059                 parent::completeNamePage();
00060 
00061                 // 'Options' page
00062                 parent::clickContinueButton();
00063 
00064                 // 'Install' page
00065                 $this->assertEquals( "Creating database user... done",
00066                         $this->getText( LINK_FORM . "ul/li[3]" ) );
00067                 parent::clickContinueButton();
00068 
00069                 // 'Complete' page
00070                 parent::completePageSuccessfull();
00071                 $this->chooseCancelOnNextConfirmation();
00072         }
00073 }