MediaWiki  REL1_19
FormOptionsTest Class Reference

This file host two test case classes for the MediaWiki FormOptions class: More...

Inheritance diagram for FormOptionsTest:
Collaboration diagram for FormOptionsTest:

List of all members.

Public Member Functions

 testGuessTypeDetection ()
 Reuse helpers above assertGuessBoolean assertGuessInt assertGuessString.
 testGuessTypeOnArrayThrowException ()
 MWException
 testGuessTypeOnNullThrowException ()
 MWException

Protected Member Functions

 setUp ()
 Instanciates a FormOptions object to play with.

Protected Attributes

 $object

Private Member Functions

 assertGuessBoolean ($data)
 Helpers for testGuessType()
 assertGuessInt ($data)
 Helpers for testGuessType()
 assertGuessString ($data)
 Helpers for testGuessType()
 guess ($expected, $data)
 Generic helper.

Detailed Description

This file host two test case classes for the MediaWiki FormOptions class:

The split let us take advantage of setting up a fixture for the methods tests. Test class for FormOptions methods. Generated by PHPUnit on 2011-02-28 at 20:46:27.

Copyright © 2011, Antoine Musso

Author:
Antoine Musso

Definition at line 19 of file FormOptionsTest.php.


Member Function Documentation

FormOptionsTest::assertGuessBoolean ( data) [private]

Helpers for testGuessType()

Definition at line 41 of file FormOptionsTest.php.

References FormOptions\BOOL, and guess().

Referenced by testGuessTypeDetection().

Here is the call graph for this function:

Here is the caller graph for this function:

FormOptionsTest::assertGuessInt ( data) [private]

Helpers for testGuessType()

Definition at line 44 of file FormOptionsTest.php.

References guess(), and FormOptions\INT.

Referenced by testGuessTypeDetection().

Here is the call graph for this function:

Here is the caller graph for this function:

FormOptionsTest::assertGuessString ( data) [private]

Helpers for testGuessType()

Definition at line 47 of file FormOptionsTest.php.

References guess(), and FormOptions\STRING.

Referenced by testGuessTypeDetection().

Here is the call graph for this function:

Here is the caller graph for this function:

FormOptionsTest::guess ( expected,
data 
) [private]

Generic helper.

Definition at line 52 of file FormOptionsTest.php.

References FormOptions\guessType().

Referenced by assertGuessBoolean(), assertGuessInt(), and assertGuessString().

Here is the call graph for this function:

Here is the caller graph for this function:

FormOptionsTest::setUp ( ) [protected]

Instanciates a FormOptions object to play with.

FormOptions::add() is tested by the class FormOptionsInitializationTest so we assume the function is well tested already an use it to create the fixture.

Definition at line 31 of file FormOptionsTest.php.

References FormOptions\add(), and FormOptions\INTNULL.

Here is the call graph for this function:

Reuse helpers above assertGuessBoolean assertGuessInt assertGuessString.

Definition at line 63 of file FormOptionsTest.php.

References assertGuessBoolean(), assertGuessInt(), and assertGuessString().

Here is the call graph for this function:


Member Data Documentation

FormOptionsTest::$object [protected]

Definition at line 23 of file FormOptionsTest.php.


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