MediaWiki
REL1_19
|
00001 <?php 00002 00036 require_once ( dirname( __FILE__ ) . '/MediaWikiInstallationCommonFunction.php' ); 00037 00038 class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction { 00039 00040 function setUp() { 00041 parent::setUp(); 00042 } 00043 00044 00045 // Verify help field availability for the fields 00046 public function testMySQLConnectToDatabaseFieldHint() { 00047 00048 parent::navigateConnetToDatabasePage(); 00049 00050 // Verify help field for 'Database host' 00051 $this->click( "//div[@id='DB_wrapper_mysql']/div/div[1]/div/span[1]" ); 00052 $this->assertEquals( MYSQL_DATABASE_HOST_HELP, 00053 $this->getText( "//div[@id='DB_wrapper_mysql']/div/div[1]/div/span[2]" ) ); 00054 00055 // Verify help field for 'Database name' 00056 $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[1]" ); 00057 $this->assertEquals( MYSQL_DATABASE_NAME_HELP, 00058 $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[2]" )); 00059 00060 00061 // Verify help field for 'Database table prefix' 00062 $this->click("//div[@id='DB_wrapper_mysql']/fieldset[1]/div[2]/div[1]/div/span[1]" ); 00063 $this->assertEquals(MYSQL_DATABASE_TABLE_PREFIX_HELP, 00064 $this->getText("//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[2]/p[1]" )); 00065 00066 // Verify help field for 'Database username' 00067 $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/div/span[1]" ); 00068 $this->assertEquals( MYSQL_DATBASE_USERNAME_HELP, 00069 $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/div/span[2]" )); 00070 00071 // Verify help field for 'Database password' 00072 $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/div/span[1]" ); 00073 $this->assertEquals( MYSQL_DATABASE_PASSWORD_HELP, 00074 $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/div/span[2]/p" )); 00075 } 00076 00077 00078 public function testSQLiteConnectToDatabaseFieldHint() { 00079 00080 parent::navigateConnetToDatabasePage(); 00081 $this->click( "DBType_sqlite" ); 00082 00083 // Verify help field for 'SQLite data directory' 00084 $this->click( "//div[@id='DB_wrapper_sqlite']/div[1]/div[1]/div/span[1]" ); 00085 $this->assertEquals( SQLITE_DATA_DIRECTORY_HELP, 00086 $this->getText( "//div[@id='DB_wrapper_sqlite']/div[1]/div[1]/div/span[2]" )); 00087 00088 // Verify help field for 'Database name' 00089 $this->click( "//div[@id='DB_wrapper_sqlite']/div[2]/div[1]/div/span[1]" ); 00090 $this->assertEquals( SQLITE_DATABASE_NAME_HELP , $this->getText( "//div[@id='DB_wrapper_sqlite']/div[2]/div[1]/div/span[2]/p" )); 00091 } 00092 00093 00094 public function testDatabaseSettingsFieldHint() { 00095 00096 $databaseName = DB_NAME_PREFIX."_db_field"; 00097 parent::navigateDatabaseSettingsPage($databaseName); 00098 00099 // Verify help field for 'Search engine' 00100 $this->click( LINK_FORM."div[2]/span[1]" ); 00101 $this->assertEquals( SEARCH_ENGINE_HELP, 00102 $this->getText( LINK_FORM."div[2]/span[2]" )); 00103 00104 // Verify help field for 'Database character set' 00105 $this->click( LINK_FORM."div[4]/span[1]" ); 00106 $this->assertEquals( DATABASE_CHARACTER_SET_HELP, 00107 $this->getText( LINK_FORM."div[4]/span[2]")); 00108 parent::restartInstallation(); 00109 } 00110 00111 00112 public function testNameFieldHint() { 00113 00114 $databaseName = DB_NAME_PREFIX."_name_field"; 00115 parent::navigateNamePage( $databaseName ); 00116 00117 // Verify help field for 'Name of Wiki' 00118 $this->click( LINK_FORM."div[1]/div[1]/div/span[1]" ); 00119 $this->assertEquals( NAME_OF_WIKI_HELP, 00120 $this->getText( LINK_FORM."div[1]/div[1]/div/span[2]/p" )); 00121 00122 // Verify help field for 'Project namespace' 00123 $this->click( LINK_FORM."div[2]/div[1]/div/span[1]" ); 00124 $this->assertEquals( PROJECT_NAMESPACE_HELP, 00125 $this->getText( LINK_FORM."div[2]/div[1]/div/span[2]/p")); 00126 00127 // Verify help field for 'Your Name' 00128 $this->click( LINK_FORM."fieldset/div[1]/div[1]/div/span[1]" ); 00129 $this->assertEquals( USER_NAME_HELP, 00130 $this->getText( LINK_FORM."fieldset/div[1]/div[1]/div/span[2]/p" )); 00131 00132 // Verify help field for 'E mail address' 00133 $this->click( LINK_FORM."fieldset/div[4]/div[1]/div/span[1]" ); 00134 $this->assertEquals( EMAIL_ADDRESS_HELP, 00135 $this->getText( LINK_FORM."fieldset/div[4]/div[1]/div/span[2]/p" )); 00136 00137 parent::restartInstallation(); 00138 } 00139 } 00140