프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_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 |