MediaWiki  REL1_21
MediaWikiMySQLDataBaseTestCase.php
Go to the documentation of this file.
00001 <?php
00026 require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
00027 
00034 class MediaWikiMySQLDataBaseTestCase extends MediaWikiInstallationCommonFunction {
00035         function setUp() {
00036                 parent::setUp();
00037         }
00038 
00039         // Verify  MediaWiki installation using 'MySQL' database type
00040         public function testMySQLDatabaseSuccess() {
00041                 $databaseName = DB_NAME_PREFIX . "_sql_db";
00042 
00043                 parent::navigateConnetToDatabasePage();
00044 
00045                 // Verify 'MySQL" is selected as the default database type
00046                 $this->assertEquals( "MySQL settings", $this->getText( "//div[@id='DB_wrapper_mysql']/h3" ) );
00047 
00048                 // Change 'Database name'
00049                 $defaultDbName = $this->getText( "mysql_wgDBname" );
00050                 $this->type( "mysql_wgDBname", " " );
00051                 $this->type( "mysql_wgDBname", $databaseName );
00052                 $this->assertNotEquals( $defaultDbName, $databaseName );
00053 
00054                 // 'Database settings' page
00055                 parent::clickContinueButton();
00056 
00057                 // 'Name' page
00058                 parent::clickContinueButton();
00059                 parent::completeNamePage();
00060 
00061                 // 'Options page
00062                 parent::clickContinueButton();
00063 
00064                 // 'Install' page
00065                 parent::clickContinueButton();
00066 
00067                 // 'Complete' page
00068                 parent::completePageSuccessfull();
00069                 parent::restartInstallation();
00070         }
00071 }