load('phpunit.xml.dist'); $searchNode = $xmlDoc->getElementsByTagName("browser"); foreach ($searchNode as $searchNode) { $this->setCurrentBrowser($searchNode->getAttribute('browser')); $this->setTimeoutValue($searchNode->getAttribute('timeout')); } $this->setLoginURL(TESTSUITE_PHPMYADMIN_HOST . TESTSUITE_PHPMYADMIN_URL); $this->setDBCredentials( TESTSUITE_USER, TESTSUITE_PASSWORD ); } /** * Sets the login url * * @param string $value login url * * @return void */ public function setLoginURL($value) { $this->_loginURL = $value; } /** * Returns the loginURL * * @return string loginURL */ public function getLoginURL() { return $this->_loginURL; } /** * Sets the timeout value * * @param int $value timeout value * * @return void */ public function setTimeoutValue($value) { $this->_timeoutValue = $value; } /** * Returns the timeout value * * @return int timeout value */ public function getTimeoutValue() { return $this->_timeoutValue; } /** * Sets the current browser * * @param string $value browser type * * @return void */ public function setCurrentBrowser($value) { $this->currentBrowser = $value; } /** * Returns the current browser type * * @return string browser type */ public function getCurrentBrowser() { return $this->currentBrowser; } /** * Sets database credentials * * @param string $user DB User * @param string $pass DB Password * * @return void */ public function setDBCredentials($user, $pass) { $this->_dbCredentials = array($user, $pass); } /** * Return database credentials * * @return array DB user and pass */ public function getDBCredentials() { return $this->_dbCredentials; } } ?>