Class WebAuthTestCase

Description

Generic Support for logginng in to the site.

This subclass of WebTestCase accepts arguments creates a special setup() that will post login credentials and destination web-page into the normal login script. It save a page load as it doesn;t need to fetch a login form first and doesn't need to clickLinks to reach a given page.

However, you still should remember that each testFunction in a sub-class will resubmit the login information. So for the sake of timliness WebAuthTestCase based test functions should aggeegate assertions more than regular unit-tests.

  • internal: This class is NOT intended for testing attacks/faulty logins, merely a convience for "regular" use and is epxected to be used primarily for driving TDD based inclusions of new features through simeple tests.

Located in /tests/include/WebAuthTestCase.inc (line 36)

WebTestCase
   |
   --DatabaseWebTestCase
      |
      --WebAuthTestCase
Direct descendents
Class Description
 class ResultTrackerLoadTest Acceptance Test Wrapper over the 5 step ResultTracker import process
 class ResultTrackerSecondLoadTest Acceptance Test Wrapper over the 5 step ResultTracker import process
 class TestInformationExport Test that the form generates the correct lists.
 class TestAdminLinks Test that the required links appear on the main admin index page
Variable Summary
 array $logins
 string $p
 string $u
Method Summary
 WebAuthTestCase WebAuthTestCase (string $title, string $user, [string $page = ""])
 void setup ()
 void tearDown ()
Variables
array $logins (line 51)

Hashed Array of testing credentials

  • var: hashed array[username]=>password for testing accounts
  • access: private
string $p (line 46)

What page to test, as a relative path from CIB_WEB_INSTALL_DIR

  • access: private
string $u (line 41)

What username to submit

  • access: private

Inherited Variables

Inherited from DatabaseWebTestCase

DatabaseWebTestCase::$db
DatabaseWebTestCase::$dbhost
DatabaseWebTestCase::$dbname
DatabaseWebTestCase::$dbpass
DatabaseWebTestCase::$dbuser
DatabaseWebTestCase::$schemaFile
Methods
Constructor WebAuthTestCase (line 60)

WebAuthTestCase Constructor

  • access: public
WebAuthTestCase WebAuthTestCase (string $title, string $user, [string $page = ""])
  • string $title: the name of this test case
  • string $user: the username to authenticate as
  • string $page: what page to test, relative path from CIB_WEB_INSTALL_DIR
setup (line 67)

Login and Navigate to desired page

void setup ()

Redefined in descendants as:
tearDown (line 75)
void tearDown ()

Redefinition of:
DatabaseWebTestCase::tearDown()

Inherited Methods

Inherited From DatabaseWebTestCase

 DatabaseWebTestCase::DatabaseWebTestCase()
 DatabaseWebTestCase::query()
 DatabaseWebTestCase::setDBName()
 DatabaseWebTestCase::setSchemaFile()
 DatabaseWebTestCase::setUp()
 DatabaseWebTestCase::tearDown()
 DatabaseWebTestCase::_fullyClose()
 DatabaseWebTestCase::_getDatabaseName()
 DatabaseWebTestCase::_isConnectionValid()
 DatabaseWebTestCase::_loadSchemaFile()

Documentation generated on Tue, 25 Apr 2006 13:12:40 -0400 by phpDocumentor 1.3.0RC3