diff --git a/build.xml b/build.xml index 69088ae56b..a6f09da0ed 100644 --- a/build.xml +++ b/build.xml @@ -19,7 +19,7 @@ - + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 33cee08d56..0431bd989c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -11,13 +11,20 @@ host="127.0.0.1" port="4444" timeout="30000"/> + - - - - + + + + + + @@ -27,8 +34,11 @@ test/libraries/common test/libraries + + test/classes + - + test/selenium diff --git a/test/selenium/PmaSeleniumTestCase.php b/test/selenium/PmaSeleniumTestCase.php index 1e4857bfe5..7bf7a61058 100644 --- a/test/selenium/PmaSeleniumTestCase.php +++ b/test/selenium/PmaSeleniumTestCase.php @@ -10,10 +10,6 @@ // Optionally add the php-client-driver to your include path //set_include_path(get_include_path() . PATH_SEPARATOR . '/opt/selenium-remote-control-1.0.1/selenium-php-client-driver-1.0.1/PEAR/'); -require_once 'PHPUnit/Framework/TestCase.php'; -require_once 'PHPUnit/Extensions/SeleniumTestCase.php'; -require_once 'Testing/Selenium.php'; - // Include the main phpMyAdmin user config // currently only $cfg['Test'] is used require_once 'config.sample.inc.php'; @@ -35,15 +31,7 @@ class PmaSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase $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->markTestSkipped("Missing Selenium configuration in config.inc.php"); // TODO add doc ref? - } - - $this->setBrowserUrl($cfg['Test']['pma_host'] . $cfg['Test']['pma_url']); + $this->setBrowserUrl(TESTSUITE_PHPMYADMIN_HOST . TESTSUITE_PHPMYADMIN_URL); $this->start(); } @@ -58,13 +46,13 @@ class PmaSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase */ public function doLogin() { - $this->open($this->cfg['Test']['pma_url']); + $this->open(TESTSUITE_PHPMYADMIN_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->type("input_username", TESTSUITE_USER); + $this->type("input_password", TESTSUITE_PASSWORD); $this->click("input_go"); $this->waitForPageToLoad("30001"); }