Свойство | Тип | Описание | |
---|---|---|---|
$_instance | TestCase | ||
$_mocks |
Метод | Описание | |
---|---|---|
__construct ( string $name = NULL, array $data = [], string $dataName = '' ) | Constructs a test case with the given name. | |
bootstrap ( ) : void | Bootstraps test suite | |
config ( |
Get/set Config for testing purposes | |
getInstance ( ) : TestCase | Returns current test instance | |
getTestingConfigArray ( ) : array | Returns default testing configuration array | |
mocks ( ) : Elgg\TestCaseMocks | Retuns mocking utility library | |
prepareHttpRequest ( string $uri = '', string $method = 'GET', array $parameters = [], integer $ajax, boolean $add_csrf_tokens = false ) : |
Create an HTTP request | |
setupMockServices ( boolean $reset = true ) : void | Substitute database dependent services with their doubles |
public static config ( |
||
$config | Config | |
Результат |
public static getInstance ( ) : TestCase | ||
Результат | TestCase |
public static getTestingConfigArray ( ) : array | ||
Результат | array |
public static mocks ( ) : Elgg\TestCaseMocks | ||
Результат | Elgg\TestCaseMocks |
public static prepareHttpRequest ( string $uri = '', string $method = 'GET', array $parameters = [], integer $ajax, boolean $add_csrf_tokens = false ) : |
||
$uri | string | URI of the request |
$method | string | HTTP method |
$parameters | array | Query/Post parameters |
$ajax | integer | AJAX api version (0 for non-ajax) |
$add_csrf_tokens | boolean | Add CSRF tokens |
Результат |
public static setupMockServices ( boolean $reset = true ) : void | ||
$reset | boolean | Reset service provider |
Результат | void |