MediaWiki  REL1_21
SeleniumConfigurationTest Class Reference
Inheritance diagram for SeleniumConfigurationTest:
Collaboration diagram for SeleniumConfigurationTest:

List of all members.

Public Member Functions

 sampleConfigs ()
 Returns an array containing: The contents of the selenium cingiguration ini file The expected selenium configuration array that getSeleniumSettings should return The expected available browsers array that getSeleniumSettings should return The expected test suites arrya that getSeleniumSettings should return.
 testErrorOnIncorrectConfigFile ()
 MWException SeleniumFramework
 testErrorOnMissingConfigFile ()
 MWException SeleniumFramework
 testgetSeleniumSettings ($sampleConfig, $expectedSettings, $expectedBrowsers, $expectedSuites)
 SeleniumFramework sampleConfigs
 testUsesGlobalVarForConfigFile ()
 SeleniumFramework

Protected Member Functions

 setUp ()
 setUp and tearDown should (where significant) happen in reverse order.
 tearDown ()
 Clean up the temporary file used to store the selenium settings.

Private Member Functions

 writeToTempFile ($textToWrite)
 create a temp file and write text to it.

Private Attributes

 $tempFileName
 The file where the test temporarity stores the selenium config.
 $testBrowsers0
 Array of expected browsers from $testConfig0.
 $testBrowsers1 = null
 Expected browsers from $testConfig1.
 $testConfig0
 String containing the a sample selenium settings.
 $testConfig1
 Another sample selenium settings file contents.
 $testSettings0
 Array of expected selenium settings from $testConfig0.
 $testSettings1
 Expected selenium settings from $testConfig1.
 $testSuites0
 Array of expected testSuites from $testConfig0.
 $testSuites1 = null
 Expected test suites from $testConfig1.

Detailed Description

Definition at line 3 of file SeleniumConfigurationTest.php.


Member Function Documentation

Returns an array containing: The contents of the selenium cingiguration ini file The expected selenium configuration array that getSeleniumSettings should return The expected available browsers array that getSeleniumSettings should return The expected test suites arrya that getSeleniumSettings should return.

Definition at line 216 of file SeleniumConfigurationTest.php.

References array().

setUp and tearDown should (where significant) happen in reverse order.

Reimplemented from MediaWikiTestCase.

Definition at line 100 of file SeleniumConfigurationTest.php.

Clean up the temporary file used to store the selenium settings.

Reimplemented from MediaWikiTestCase.

Definition at line 110 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::testgetSeleniumSettings ( sampleConfig,
expectedSettings,
expectedBrowsers,
expectedSuites 
)

SeleniumFramework sampleConfigs

Definition at line 176 of file SeleniumConfigurationTest.php.

References array(), SeleniumConfig\getSeleniumSettings(), and writeToTempFile().

SeleniumConfigurationTest::writeToTempFile ( textToWrite) [private]

create a temp file and write text to it.

Parameters:
$testToWritethe text to write to the temp file

Definition at line 202 of file SeleniumConfigurationTest.php.

Referenced by testgetSeleniumSettings(), and testUsesGlobalVarForConfigFile().


Member Data Documentation

SeleniumConfigurationTest::$tempFileName [private]

The file where the test temporarity stores the selenium config.

This should be cleaned up as part of teardown.

Definition at line 9 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::$testBrowsers0 [private]
Initial value:
 array( 'firefox' => '*firefox',
                'iexplorer' => '*iexploreproxy',
                'chrome' => '*chrome'
        )

Array of expected browsers from $testConfig0.

Definition at line 37 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::$testBrowsers1 = null [private]

Expected browsers from $testConfig1.

Definition at line 77 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::$testConfig0 [private]
Initial value:
 '
[SeleniumSettings]
browsers[firefox]       = "*firefox"
browsers[iexplorer] = "*iexploreproxy"
browsers[chrome]        = "*chrome"
host                            = "localhost"
port                            = "foobarr"
wikiUrl                         = "http://localhost/deployment"
username                        = "xxxxxxx"
userPassword            = ""
testBrowser             = "chrome"
startserver             =
stopserver              =
jUnitLogFile    =
runAgainstGrid  = false

[SeleniumTests]
testSuite[SimpleSeleniumTestSuite] = "tests/selenium/SimpleSeleniumTestSuite.php"
testSuite[TestSuiteName] = "testSuitePath"
'

String containing the a sample selenium settings.

Definition at line 14 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::$testConfig1 [private]
Initial value:
                '
[SeleniumSettings]
host                            = "localhost"
testBrowser             = "firefox"
'

Another sample selenium settings file contents.

Definition at line 68 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::$testSettings0 [private]
Initial value:
 array(
                'host' => 'localhost',
                'port' => 'foobarr',
                'wikiUrl' => 'http://localhost/deployment',
                'username' => 'xxxxxxx',
                'userPassword' => '',
                'testBrowser' => 'chrome',
                'startserver' => null,
                'stopserver' => null,
                'seleniumserverexecpath' => null,
                'jUnitLogFile' => null,
                'runAgainstGrid' => null
        )

Array of expected selenium settings from $testConfig0.

Definition at line 44 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::$testSettings1 [private]
Initial value:
 array(
                'host' => 'localhost',
                'port' => null,
                'wikiUrl' => null,
                'username' => null,
                'userPassword' => null,
                'testBrowser' => 'firefox',
                'startserver' => null,
                'stopserver' => null,
                'seleniumserverexecpath' => null,
                'jUnitLogFile' => null,
                'runAgainstGrid' => null
        )

Expected selenium settings from $testConfig1.

Definition at line 81 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::$testSuites0 [private]
Initial value:
 array(
                'SimpleSeleniumTestSuite' => 'tests/selenium/SimpleSeleniumTestSuite.php',
                'TestSuiteName' => 'testSuitePath'
        )

Array of expected testSuites from $testConfig0.

Definition at line 60 of file SeleniumConfigurationTest.php.

SeleniumConfigurationTest::$testSuites1 = null [private]

Expected test suites from $testConfig1.

Definition at line 97 of file SeleniumConfigurationTest.php.


The documentation for this class was generated from the following file: