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