'Firefox on Windows XP', 'browser' => '*firefox', 'host' => 'my.windowsxp.box', 'port' => 4444, 'timeout' => 30000, ), array( 'name' => 'Internet Explorer on Windows XP', 'browser' => '*iexplore', 'host' => 'my.windowsxp.box', 'port' => 4444, 'timeout' => 30000, ), ); public function setUp() { global $cfg; $this->cfg =& $cfg; //PHPUnit_Extensions_SeleniumTestCase::$browsers = $this->cfg['Test']['broswers']; // Check if the test configuration is available if ( empty($cfg['Test']['pma_host']) || empty($cfg['Test']['pma_url']) //|| empty($cfg['Test']['browsers']) ) { $this->fail("Missing Selenium configuration in config.inc.php"); // TODO add doc ref? } $this->setBrowserUrl($cfg['Test']['pma_host'] . $cfg['Test']['pma_url']); $this->start(); } public function tearDown() { $this->stop(); } /** * perform a login */ public function doLogin() { $this->open($this->cfg['Test']['pma_url']); // Somehow selenium does not like the language selection on the cookie login page, forced English in the config for now. //$this->select("lang", "label=English"); $this->waitForPageToLoad("30000"); $this->type("input_username", $this->cfg['Test']['testuser']['username']); $this->type("input_password", $this->cfg['Test']['testuser']['password']); $this->click("input_go"); $this->waitForPageToLoad("30001"); } /* * Just a dummy to show some example statements * public function mockTest() { // Slow down the testing speed, ideal for debugging //$this->setSpeed(4000); } */ } ?>