PHP Class lithium\test\Group

Tests are added to this group either on construct by passing a fully-namespaced test class or namespace string-based path, e.g. $group = new Group(array('data' => array( 'data\ModelTest', new \lithium\tests\cases\core\ObjectTest() ))); Or they can be added programmatically: $group->add('data\ModelTest');
Inheritance: extends lithium\util\Collection
Afficher le fichier Open project: unionofrad/lithium Class Usage Examples

Méthodes publiques

Méthode Description
add ( string $test = null, array $options = [] ) : array Add a tests to the group.
all ( array $options = [] ) : array Get all test cases. By default, does not include function or integration tests.
tests ( string | array $params = [], array $options = [] ) : Collection Get the collection of tests

Méthodes protégées

Méthode Description
_init ( ) : void auto init for setting up items passed into constructor
_resolve ( string $test ) : array Resolves a unit test class (or classes) from a class or namespace path string.

Method Details

_init() protected méthode

auto init for setting up items passed into constructor
protected _init ( ) : void
Résultat void

_resolve() protected méthode

Resolves a unit test class (or classes) from a class or namespace path string.
protected _resolve ( string $test ) : array
$test string The path string in which to find the test case(s). This may be a library, a namespace, or a fully-namespaced class reference.
Résultat array Returns an array containing one or more fully-namespaced class references to unit tests.

add() public méthode

Add a tests to the group.
public add ( string $test = null, array $options = [] ) : array
$test string The test to be added.
$options array Method options. Currently not used in this method.
Résultat array Updated list of tests contained within this collection.

all() public static méthode

Get all test cases. By default, does not include function or integration tests.
public static all ( array $options = [] ) : array
$options array
Résultat array

tests() public méthode

Get the collection of tests
public tests ( string | array $params = [], array $options = [] ) : Collection
$params string | array
$options array
Résultat lithium\util\Collection