diff --git a/test/selenium/ChangePasswordTest.php b/test/selenium/ChangePasswordTest.php index aea07b71b4..3488d7dabd 100644 --- a/test/selenium/ChangePasswordTest.php +++ b/test/selenium/ChangePasswordTest.php @@ -38,19 +38,19 @@ class ChangePasswordTest extends TestBase try { $ele = $this->waitForElement("byName", "pma_pw"); $this->assertEquals("", $ele->value()); - } catch (PHPUnit_Framework_AssertionFailedError $e) { + } catch (\PHPUnit_Framework_AssertionFailedError $e) { array_push($this->verificationErrors, $e->toString()); } try { $ele = $this->waitForElement("byName", "pma_pw2"); $this->assertEquals("", $ele->value()); - } catch (PHPUnit_Framework_AssertionFailedError $e) { + } catch (\PHPUnit_Framework_AssertionFailedError $e) { array_push($this->verificationErrors, $e->toString()); } try { $ele = $this->waitForElement("byName", "generated_pw"); $this->assertEquals("", $ele->value()); - } catch (PHPUnit_Framework_AssertionFailedError $e) { + } catch (\PHPUnit_Framework_AssertionFailedError $e) { array_push($this->verificationErrors, $e->toString()); } $this->byId("button_generate_password")->click(); diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index 1c232e169a..28c429133c 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -395,7 +395,7 @@ abstract class TestBase extends \PHPUnit_Extensions_Selenium2TestCase return call_user_func_array( array($this, $func), array($arg) ); - } catch(Exception $e) { + } catch(\Exception $e) { // Element not present, fall back to waiting } $this->timeouts()->implicitWait(10000); @@ -438,10 +438,10 @@ abstract class TestBase extends \PHPUnit_Extensions_Selenium2TestCase $element = call_user_func_array( array($this, $func), array($arg) ); - } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) { + } catch (\PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) { // Element not present return false; - } catch (InvalidArgumentException $e) { + } catch (\InvalidArgumentException $e) { // Element not present return false; } @@ -578,7 +578,7 @@ abstract class TestBase extends \PHPUnit_Extensions_Selenium2TestCase $ele = null; try { $ele = $this->waitForElement('byCssSelector', 'li.submenu > a'); - } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) { + } catch (\PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) { return; }