From 9db190c7e736ec8d063187d4241b59feaf7dc2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 22 Jun 2011 11:28:20 +0200 Subject: update to MediaWiki 1.17.0 --- maintenance/tests/selenium/SeleniumTestSuite.php | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 maintenance/tests/selenium/SeleniumTestSuite.php (limited to 'maintenance/tests/selenium/SeleniumTestSuite.php') diff --git a/maintenance/tests/selenium/SeleniumTestSuite.php b/maintenance/tests/selenium/SeleniumTestSuite.php new file mode 100644 index 00000000..ba178051 --- /dev/null +++ b/maintenance/tests/selenium/SeleniumTestSuite.php @@ -0,0 +1,46 @@ +isSetUp ) { + return; + } + $this->isSetUp = true; + $this->selenium = Selenium::getInstance(); + $this->selenium->start(); + $this->selenium->open( $this->selenium->getUrl() . '/index.php?setupTestSuite=' . $this->getName() ); + if ( $this->loginBeforeTests ) { + $this->login(); + } + } + + public function tearDown() { + $this->selenium->open( $this->selenium->getUrl() . '/index.php?clearTestSuite=' . $this->getName() ); + $this->selenium->stop(); + } + + public function login() { + $this->selenium->login(); + } + + public function loadPage( $title, $action ) { + $this->selenium->loadPage( $title, $action ); + } + + protected function setLoginBeforeTests( $loginBeforeTests = true ) { + $this->loginBeforeTests = $loginBeforeTests; + } +} -- cgit v1.2.3-54-g00ecf