コード例 #1
0
 public function testDifferentDatabaseAccount()
 {
     $databaseName = DB_NAME_PREFIX . "_dif_accounts";
     // Navigate to the 'Database settings' page
     parent::navigateDatabaseSettingsPage($databaseName);
     // Click on the 'Use the same account as for installation' check box
     $this->click("mysql__SameAccount");
     // Change the 'Database username'
     $this->type("mysql_wgDBuser", DB_WEB_USER);
     // Enter 'Database password:'******'Create the account if it does not already exist' check box
     $this->click("mysql__CreateDBAccount");
     parent::clickContinueButton();
     // 'Name' page
     parent::completeNamePage();
     // 'Options' page
     parent::clickContinueButton();
     // 'Install' page
     $this->assertEquals("Creating database user... done", $this->getText(LINK_FORM . "ul/li[3]"));
     parent::clickContinueButton();
     // 'Complete' page
     parent::completePageSuccessfull();
     $this->chooseCancelOnNextConfirmation();
 }
コード例 #2
0
 public function testDifferentDatabasePrefix()
 {
     $databaseName = DB_NAME_PREFIX . "_db_prefix";
     parent::navigateInstallPage($databaseName);
     // To 'Options' page
     parent::clickBackButton();
     // To 'Name' page
     parent::clickBackButton();
     // To 'Database settings' page
     parent::clickBackButton();
     // To 'Connect to database' page
     parent::clickBackButton();
     // From 'Connect to database' page without database prefix
     parent::clickContinueButton();
     // Verify upgrade existing message
     $this->assertEquals("Upgrade existing installation", $this->getText(LINK_DIV . "h2"));
     // To 'Connect to database' page
     parent::clickBackButton();
     // Input the database prefix
     $this->type("mysql_wgDBprefix", DATABASE_PREFIX);
     // From 'Connect to database' page with database prefix
     parent::clickContinueButton();
     // To 'Complete' page
     parent::clickContinueButton();
     parent::completeNamePage();
     parent::clickContinueButton();
     // Verify already installed warning message
     $this->assertEquals("Install", $this->getText(LINK_DIV . "h2"));
     $this->assertEquals("Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", $this->getText(LINK_FORM . "div[1]"));
     parent::clickContinueButton();
     parent::completePageSuccessfull();
     $this->chooseCancelOnNextConfirmation();
     parent::restartInstallation();
 }
コード例 #3
0
 public function testMySQLDatabaseSuccess()
 {
     $databaseName = DB_NAME_PREFIX . "_sqlite_db";
     parent::navigateConnetToDatabasePage();
     $this->click("DBType_sqlite");
     // Select 'SQLite' database type
     $this->assertEquals("SQLite settings", $this->getText("//div[@id='DB_wrapper_sqlite']/h3"));
     // Change database name
     $defaultDbName = $this->getText("sqlite_wgDBname");
     $this->type("sqlite_wgDBname", " ");
     $this->type("sqlite_wgDBname", $databaseName);
     $this->assertNotEquals($defaultDbName, $databaseName);
     // 'Database settings' page
     parent::clickContinueButton();
     // 'Name' page
     parent::clickContinueButton();
     parent::completeNamePage();
     // 'Options page
     parent::clickContinueButton();
     // 'Install' page
     parent::clickContinueButton();
     // 'Complete' page
     parent::completePageSuccessfull();
     parent::restartInstallation();
 }
コード例 #4
0
 public function testUpgradeExistingDatabase()
 {
     $databaseName = DB_NAME_PREFIX . "_upgrade_existing";
     parent::navigateInstallPage($databaseName);
     $this->open("http://*****:*****@id='bodyContent']/div/div[1]/div[4]/form/div[1]/div[2]/p[1]"));
     $this->assertEquals("You can now Folder/index.php start using your wiki.", $this->getText("//div[@id='bodyContent']/div/div[1]/div[4]/form/div[1]/div[2]/p[2]"));
     $this->assertEquals("Folder/index.php start using your wiki", $this->getText("link=Folder/index.php start using your wiki"));
     $this->assertTrue($this->isElementPresent("submit-regenerate"));
     $this->click("submit-regenerate");
     $this->waitForPageToLoad(PAGE_LOAD_TIME);
     $this->assertEquals("Database settings", $this->getText(LINK_DIV . "h2"));
     // 'Database settings' page
     parent::clickContinueButton();
     // Name page
     parent::completeNamePage();
     // Options page
     parent::clickContinueButton();
     // Install page
     $this->assertEquals("Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", $this->getText(LINK_FORM . "div[1]/div[2]"));
     parent::clickContinueButton();
     // complete
     parent::completePageSuccessfull();
     $this->chooseCancelOnNextConfirmation();
     parent::restartInstallation();
 }
 public function testInstallOnAlreadyInstalled()
 {
     $databaseName = DB_NAME_PREFIX . "_already_installed";
     parent::navigateInstallPage($databaseName);
     // 'Options' page
     parent::clickBackButton();
     // Install page
     parent::clickContinueButton();
     // 'Install' page should display after the 'Option' page
     $this->assertEquals("Install", $this->getText(LINK_DIV . "h2"));
     // Verify warning text displayed
     $this->assertEquals("Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", $this->getText(LINK_FORM . "div[1]/div[2]"));
     // Complete page
     parent::clickContinueButton();
     parent::completePageSuccessfull();
     $this->chooseCancelOnNextConfirmation();
     parent::restartInstallation();
 }
コード例 #6
0
 public function testMySQLDatabaseSuccess()
 {
     $databaseName = DB_NAME_PREFIX . "_sql_db";
     parent::navigateConnetToDatabasePage();
     // Verify 'MySQL" is selected as the default database type
     $this->assertEquals("MySQL settings", $this->getText("//div[@id='DB_wrapper_mysql']/h3"));
     // Change 'Database name'
     $defaultDbName = $this->getText("mysql_wgDBname");
     $this->type("mysql_wgDBname", " ");
     $this->type("mysql_wgDBname", $databaseName);
     $this->assertNotEquals($defaultDbName, $databaseName);
     // 'Database settings' page
     parent::clickContinueButton();
     // 'Name' page
     parent::clickContinueButton();
     parent::completeNamePage();
     // 'Options page
     parent::clickContinueButton();
     // 'Install' page
     parent::clickContinueButton();
     // 'Complete' page
     parent::completePageSuccessfull();
     parent::restartInstallation();
 }