Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
WebTestCase Class Reference
Inheritance diagram for WebTestCase:
FunctionalImportExportBaseTestCase

Protected Member Functions

 getAffectedTables ()
 
 improveException ($e, $testObject)
 
 logIn ($username= 'admin', $password=null)
 
 setUp ()
 
 submitAjaxForm ($formId)
 
 tearDown ()
 
 typeText ($box, $letters)
 
 verified ()
 
 verifyAndOpen ($url)
 

Detailed Description

Base test class for Selenium functional tests.

Definition at line 19 of file WebTestCase.inc.php.

Member Function Documentation

WebTestCase::getAffectedTables ( )
protected

Override this method if you want to backup/restore tables before/after the test.

Returns
array A list of tables to backup and restore.

Definition at line 28 of file WebTestCase.inc.php.

Referenced by setUp(), and tearDown().

WebTestCase::improveException (   $e,
  $testObject 
)
protected

Make the exception message more informative.

Parameters
$eException
$testObjectstring
Returns
Exception

Definition at line 148 of file WebTestCase.inc.php.

WebTestCase::logIn (   $username = 'admin',
  $password = null 
)
protected

Log in as passed user, with the passed password. If none is passed, log in as admin user.

Definition at line 84 of file WebTestCase.inc.php.

WebTestCase::setUp ( )
protected

Definition at line 35 of file WebTestCase.inc.php.

References getAffectedTables(), DAORegistry\getDAO(), and Config\getVar().

WebTestCase::submitAjaxForm (   $formId)
protected

Save an Ajax form, waiting for the loading sprite to be hidden to continue the test execution.

Parameters
$formLocatorString

Definition at line 163 of file WebTestCase.inc.php.

WebTestCase::tearDown ( )
protected

Definition at line 75 of file WebTestCase.inc.php.

References getAffectedTables().

WebTestCase::typeText (   $box,
  $letters 
)
protected

Types a text into an input field.

This is done using low-level methods in a way to simulate actual key-press events that can trigger autocomplete events or similar.

Parameters
$boxstring the locator of the box
$lettersstring the text to type

Definition at line 127 of file WebTestCase.inc.php.

WebTestCase::verified ( )
protected

Check for verification errors and clean the verification error list.

Definition at line 97 of file WebTestCase.inc.php.

Referenced by verifyAndOpen().

WebTestCase::verifyAndOpen (   $url)
protected

Open a URL but only if it's not already the current location.

Parameters
$urlstring

Definition at line 109 of file WebTestCase.inc.php.

References verified().


The documentation for this class was generated from the following file: