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

Should setUp() method open new browser window for each test, because now it open both tests in same browser window?

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

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

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

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

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

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