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
ファイルを表示 Open project: unionofrad/lithium Class Usage Examples

Public Methods

Method 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

Protected Methods

Method 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 method

auto init for setting up items passed into constructor
protected _init ( ) : void
return void

_resolve() protected method

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.
return array Returns an array containing one or more fully-namespaced class references to unit tests.

add() public method

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.
return array Updated list of tests contained within this collection.

all() public static method

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

tests() public method

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