2 if (!defined('MEDIAWIKI') ||
!defined('SELENIUMTEST')) {
3 echo "This script cannot be run standalone";
7 class SeleniumTestCase
extends PHPUnit_Framework_TestCase
//PHPUnit_Extensions_SeleniumTestCase
11 public function setUp()
14 $this->selenium
= Selenium
::getInstance();
15 //print_r($this->suite);
18 public function tearDown()
23 public function __call($method, $args)
25 return call_user_func_array (array($this->selenium
, $method), $args);
28 public function assertSeleniumAttributeEquals($attribute, $value)
30 $attr = $this->getAttribute($attribute);
31 $this->assertEquals($attr, $value);
34 public function assertSeleniumHTMLContains($element, $text)
36 $innerHTML = $this->getText($element);
38 $this->assertRegExp("/$text/", $innerHTML );