w/s changes
[lhc/web/wiklou.git] / maintenance / tests / selenium / SeleniumTestSuite.php
1 <?php
2
3 class SeleniumTestSuite extends PHPUnit_Framework_TestSuite {
4 private $selenium;
5 private $isSetUp = false;
6
7 // Do not add line break after test output
8 const CONTINUE_LINE = 1;
9 const RESULT_OK = 2;
10 const RESULT_ERROR = 3;
11
12 public function setUp() {
13 // Hack because because PHPUnit version 3.0.6 which is on prototype does not
14 //run setUp as part of TestSuite::run
15 if ( $this->isSetUp ) {
16 return;
17 }
18 $this->isSetUp = true;
19 $this->selenium = Selenium::getInstance();
20 $this->selenium->start();
21 $this->login();
22 // $this->loadPage( 'Testpage', 'edit' );
23 }
24
25 public function tearDown() {
26 $this->selenium->stop();
27 }
28
29 public function login() {
30 $this->selenium->login();
31 }
32
33 public function loadPage( $title, $action ) {
34 $this->selenium->loadPage( $title, $action );
35 }
36 }
37