Skip to content

Instantly share code, notes, and snippets.

@MarcelloDuarte
Created September 20, 2011 13:38
Show Gist options
  • Save MarcelloDuarte/1229082 to your computer and use it in GitHub Desktop.
Save MarcelloDuarte/1229082 to your computer and use it in GitHub Desktop.
<?php
namespace Behat\Mink\Driver\Selenium;
use \PHPUnit_Extensions_SeleniumTestCase as SeleniumTestCase;
class Client extends SeleniumTestCase
{
public function __construct($browser = '*firefox', $sid = null,
$host = 'http://localhost',
$port = 4444, $timeout = 30, $httpTimeout = 45)
{
$this->browserName = $browser;
$this->data = array();
$this->dataName = '';
$this->testId = md5(uniqid(rand(), TRUE));
$driver = new \PHPUnit_Extensions_SeleniumTestCase_Driver;
$driver->setBrowser($browser);
$driver->setHost($host);
$driver->setPort($port);
$driver->setTimeout($timeout);
$driver->setHttpTimeout($httpTimeout);
$driver->setTestCase($this);
$driver->setTestId($this->testId);
$this->drivers[] = $driver;
$this->setBrowser($browser);
$this->setBrowserUrl($host);
$this->setPort($port);
$this->start();
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment