sebastianbergmann/phpunit — Issue #507: Selenium::Should setUp() method open new browser window for each test?
Author: dgolubev
Created: 2012-02-21 17:32:08+00:00
State: open

Should setUp() method open new browser window for each test?

class TestCommon2 extends PHPUnit_Extensions_SeleniumTestCase {
public static $mBrowserUrl = 'http://localhost/';
public $mUser;

//	------	constructor	------
public function setUp() {
$this->setBrowserUrl(self::$mBrowserUrl);
$this->setBrowser('*firefox');
}

public function testMethod1() {
$this->open('http://www.example.com/');

print("\n----	method 1	----\n");
}

/*
* @depends testMethod1
*/
public function testMethod2() {
$this->open('http://www.google.com/');

print("\n----	test Method 2	----\n");
}
}