MediaWiki  REL1_19
MediaWikiMySQLiteDataBaseTestCase.php
Go to the documentation of this file.
00001 <?php
00002 
00031 require_once (dirname(__FILE__).'/'.'MediaWikiInstallationCommonFunction.php');
00032 
00039 class MediaWikiMySQLiteDataBaseTestCase extends MediaWikiInstallationCommonFunction {
00040 
00041     function setUp() {
00042         parent::setUp();
00043     }
00044 
00045     // Verify  MediaWiki installation using 'MySQL' database type
00046     public function testMySQLDatabaseSuccess() {
00047 
00048         $databaseName = DB_NAME_PREFIX."_sqlite_db";
00049 
00050         parent::navigateConnetToDatabasePage();
00051         $this->click( "DBType_sqlite" );
00052 
00053         // Select 'SQLite' database type
00054         $this->assertEquals( "SQLite settings", $this->getText( "//div[@id='DB_wrapper_sqlite']/h3" ));
00055 
00056         // Change database name
00057         $defaultDbName = $this->getText( "sqlite_wgDBname" );
00058         $this->type( "sqlite_wgDBname", " ");
00059         $this->type( "sqlite_wgDBname", $databaseName );
00060         $this->assertNotEquals( $defaultDbName, $databaseName );
00061 
00062         // 'Database settings' page
00063         parent::clickContinueButton();
00064 
00065         // 'Name' page
00066         parent::clickContinueButton();
00067         parent::completeNamePage();
00068 
00069         // 'Options page
00070         parent::clickContinueButton();
00071 
00072         // 'Install' page
00073         parent::clickContinueButton();
00074 
00075         // 'Complete' page
00076         parent::completePageSuccessfull();
00077         parent::restartInstallation();
00078     }
00079 }