2010-11-05 74 views

回答

2

您不必延長PHPUnit_Extensions_SeleniumTestCase,您可以在setUp方法初始化硒和tearDown關閉它:

class GoogleTest extends Zend_Test_PHPUnit_DatabaseTestCase { 

    private $selenium; 

    public function setUp() 
    { 
     $this->selenium = new Testing_Selenium("*iexplore", "http://<your_url_under_the_test>"); 
     $this->selenium->start(); 
    } 

    public function tearDown() 
    { 
     $this->selenium->stop(); 
    } 

    // Your tests... 

}