Created
August 16, 2011 16:00
-
-
Save glennpratt/1149422 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if ($rc != 'local') { | |
| // Need SauceLabs PEAR. | |
| include_once 'PHPUnit/Extensions/SeleniumTestCase/SauceOnDemandTestCase.php'; | |
| class SeleniumWrapper extends PHPUnit_Extensions_SeleniumTestCase_SauceOnDemandTestCase { | |
| // @TODO - Allow this list to be configured. | |
| public static $browsers = array( | |
| array( | |
| 'name' => 'Firefox 5 on Windows', | |
| 'os' => 'Windows 2003', | |
| 'browser' => 'firefox', | |
| 'browserVersion' => '5.' | |
| ), | |
| array( | |
| 'name' => 'Internet Explorer 7 on Windows', | |
| 'os' => 'Windows 2003', | |
| 'browser' => 'iexplore', | |
| 'browserVersion' => '7.' | |
| ) | |
| ); | |
| public function connect($browser) { | |
| $this->setHttpTimeout(90000); | |
| } | |
| } | |
| } else { | |
| // Don't need SauceLabs PEAR, just use PHPUnit. | |
| class SeleniumWrapper extends PHPUnit_Extensions_SeleniumTestCase { | |
| public function connect() { | |
| $this->setBrowser(SELENIUM_BROWSER); | |
| $this->setHost('localhost'); | |
| $this->setPort(SELENIUM_BROWSER_PORT); | |
| } | |
| } | |
| } | |
| ?> |
Actually b/c this is PHP, I venture that class SeleniumWrapper extends $parentclass implements iSeleniumWrapper might work...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"class SeleniumWrapper extends PHPUnit_Extensions_SeleniumTestCase_SauceOnDemandTestCase"
"class SeleniumWrapper extends PHPUnit_Extensions_SeleniumTestCase"
this could be
"class SeleniumWrapper extends xyzParent implements iSeleniumWrapper"