Skip to content

Conversation

@shupp
Copy link

@shupp shupp commented May 31, 2012

  • Throw/Expect new WebDriver_Exception instead of Exception
  • Add default $six_hex value of null to eliminate warnings
    (which become exceptions in PHPUnit's error handling)
  • Use preg_split() instead of the deprecated split() to eliminate
    deperecation warnings
  • Expect PHPUnit_Framework_ExpectationFailedException when appropriate

* Throw/Expect new WebDriver_Exception instead of Exception
* Add default $six_hex value of null to eliminate warnings
  (which become exceptions in PHPUnit's error handling)
* Use preg_split() instead of the deprecated split() to eliminate
  deperecation warnings
* Expect PHPUnit_Framework_ExpectationFailedException when appropriate
@openprivacy
Copy link

Thank you, this is just what I needed. With PHPUnit 3.6.10 and PHP 5.5.3 (on Xubuntu 13.10) this patch mostly worked, with one exception changed:

diff --git a/WebDriverColorTest.php b/WebDriverColorTest.php
index 0c93a31..ba26bc2 100644
--- a/WebDriverColorTest.php
+++ b/WebDriverColorTest.php
@@ -39,7 +39,7 @@ class WebDriverColorTest extends PHPUnit_Framework_TestCase {

   /**
    * @dataProvider invalid_colors
-   * @expectedException Exception
+   * @expectedException PHPUnit_Framework_Error_Notice
    */
   public function test_invalid_colors($input) {
     WebDriver::CanonicalizeCSSColor($input);

I noticed also that the maintainer already updated split() -> preg_split(), but did not merge the rest of this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants