Свойство | Тип | Описание | |
---|---|---|---|
$apiController | For the purpose of data conversion | ||
$apiKeyEntity | Scalr\Model\Entity\Account\User\ApiKeyEntity | Api key entity | |
$apiVersion | string | API version | |
$env | Scalr_Environment instance | ||
$governance | Scalr_Governance | Scalr Governance | |
$governanceConfiguration | array | Governance configuration | |
$loggerConfiguration | array | List of logger what we should be excluded from debug output key is logger name and value is logger level | |
$testData | array | Ids of data generated during the test Destructor clean up data by these ids | |
$testEnvId | integer | ID of the user's environment | |
$testUserId | integer | ID of the user which is used in the functional test | |
$user | Test User |
Метод | Описание | |
---|---|---|
__construct ( $name = null, $data = [], $dataName = null ) | ||
assertDescribeResponseNotEmpty ( Scalr\Tests\Functional\Api\ApiTestResponse $response ) | Asserts describe response has all properties | |
assertErrorMessageContains ( Scalr\Tests\Functional\Api\ApiTestResponse $response, integer $expectedStatus, string $expectedError = null, string $expectedMessage = null ) | Asserts api error response | |
assertErrorMessageErrorEquals ( string $expectedError, Scalr\Tests\Functional\Api\ApiTestResponse $response ) | Asserts error message error | |
assertErrorMessageStatusEquals ( integer $expectedStatus, Scalr\Tests\Functional\Api\ApiTestResponse $response ) | Asserts error message status | |
assertErrorMessageTextEquals ( string $expectedMessage, Scalr\Tests\Functional\Api\ApiTestResponse $response ) | Asserts error message text | |
assertFetchResponseNotEmpty ( Scalr\Tests\Functional\Api\ApiTestResponse $response ) | Asserts fetch response has all properties | |
assertImageObjectNotEmpty ( object $data ) | Asserts if images's object has all properties | |
assertObjectEqualsEntity ( $object, |
Asserts that object equals entity | |
assertVariableObjectNotEmpty ( object $data ) | Asserts if variable's object has all properties | |
createEntity ( |
Creates and save entity to DB, keeps entity to delete after test | |
getAccountApiUrl ( string $uriPart ) : string | Gets Account API url | |
getAdapter ( string $name, |
Gets API entity adapter | |
getGovernance ( ) : Scalr_Governance | Gets governance object | |
getUserApiUrl ( string $uriPart, integer $envId = null ) : string | Gets User API url | |
isRecursivelyEmpty ( mixed $data ) : boolean | Recursively checks that data is empty | |
printResponseError ( Scalr\Tests\Functional\Api\ApiTestResponse $response ) : string | Makes string representation of error | |
request ( string $uri, string $method = Request::METHOD_GET, array $params = [], array $body = [], array $headers = [] ) : Scalr\Tests\Functional\Api\ApiTestResponse | Calls api controllers' actions | |
restoreGovernanceConfiguration ( ) | Restores a previously saved governance configuration | |
setUpBeforeClass ( ) | Setups test user, environment and API key | |
setupGovernanceConfiguration ( array $governanceConfiguration, boolean $savePrevious = true ) | Setup governance configuration | |
tearDownAfterClass ( ) | Removes API key and Entities generated for test | |
toDelete ( string $class, array $identifier, array $initProperties = null ) | Registers specified Entity for removal |
Метод | Описание | |
---|---|---|
changeLoggerConfiguration ( ) | Change logger level and save current level | |
getEnvironment ( ) : |
Gets a test environment instance | |
getNewImageId ( Scalr_Environment $env, string $cloudLocation ) : null | string | Gets unused image id from the cloud | |
getUser ( ) : |
Gets an test User instance | |
setUp ( ) |
Метод | Описание | |
---|---|---|
getTestEnvProperties ( ) : array | Gets test properties for applicatiob environment |
public assertDescribeResponseNotEmpty ( Scalr\Tests\Functional\Api\ApiTestResponse $response ) | ||
$response | Scalr\Tests\Functional\Api\ApiTestResponse | Api response |
public assertErrorMessageContains ( Scalr\Tests\Functional\Api\ApiTestResponse $response, integer $expectedStatus, string $expectedError = null, string $expectedMessage = null ) | ||
$response | Scalr\Tests\Functional\Api\ApiTestResponse | Api response |
$expectedStatus | integer | Expected Status |
$expectedError | string | optional Expected error |
$expectedMessage | string | optional Expected message |
public assertErrorMessageErrorEquals ( string $expectedError, Scalr\Tests\Functional\Api\ApiTestResponse $response ) | ||
$expectedError | string | Expected error |
$response | Scalr\Tests\Functional\Api\ApiTestResponse | Api response |
public assertErrorMessageStatusEquals ( integer $expectedStatus, Scalr\Tests\Functional\Api\ApiTestResponse $response ) | ||
$expectedStatus | integer | Expected Status |
$response | Scalr\Tests\Functional\Api\ApiTestResponse | Api response |
public assertErrorMessageTextEquals ( string $expectedMessage, Scalr\Tests\Functional\Api\ApiTestResponse $response ) | ||
$expectedMessage | string | Expected message |
$response | Scalr\Tests\Functional\Api\ApiTestResponse | Api response |
public assertFetchResponseNotEmpty ( Scalr\Tests\Functional\Api\ApiTestResponse $response ) | ||
$response | Scalr\Tests\Functional\Api\ApiTestResponse | Api response |
public assertImageObjectNotEmpty ( object $data ) | ||
$data | object | Single image's item |
public assertObjectEqualsEntity ( $object, |
||
$object | ||
$entity | ||
$adapter | string | optional Entity adapter name |
public assertVariableObjectNotEmpty ( object $data ) | ||
$data | object | Single image's item |
protected static changeLoggerConfiguration ( ) |
public static createEntity ( |
||
$entity | Entity instance | |
$data | array | Properties to initialize |
$requiredData | array | The list of names properties which should be save and initialize after delete |
Результат |
public static getAccountApiUrl ( string $uriPart ) : string | ||
$uriPart | string | Part of the api uri |
Результат | string | Returns User API url |
public getAdapter ( string $name, |
||
$name | string | Adapter name |
$controller | optional API Controller | |
Результат |
protected getEnvironment ( ) : |
||
Результат | Returns environment instance |
public getGovernance ( ) : Scalr_Governance | ||
Результат | Scalr_Governance |
protected getUser ( ) : |
||
Результат | Returns user instance |
public static isRecursivelyEmpty ( mixed $data ) : boolean | ||
$data | mixed | Data to check |
Результат | boolean | Returns true if $data are empty or $data is object/array, all child elements of which recursively empty, false otherwise |
public printResponseError ( Scalr\Tests\Functional\Api\ApiTestResponse $response ) : string | ||
$response | Scalr\Tests\Functional\Api\ApiTestResponse | Response envelope |
Результат | string |
public request ( string $uri, string $method = Request::METHOD_GET, array $params = [], array $body = [], array $headers = [] ) : Scalr\Tests\Functional\Api\ApiTestResponse | ||
$uri | string | Request uri |
$method | string | Http action |
$params | array | optional Array of GET values |
$body | array | optional POST fields => values |
$headers | array | optional Custom headers |
Результат | Scalr\Tests\Functional\Api\ApiTestResponse | Returns API test response |
public restoreGovernanceConfiguration ( ) |
public static setUpBeforeClass ( ) |
public setupGovernanceConfiguration ( array $governanceConfiguration, boolean $savePrevious = true ) | ||
$governanceConfiguration | array | Governance configuration |
$savePrevious | boolean | optional If true, current governance configuration be saved before setting up a new |
public static tearDownAfterClass ( ) |
protected static ApiController,Scalr\Api\Rest\Controller $apiController | ||
Результат |
protected static ApiKeyEntity,Scalr\Model\Entity\Account\User $apiKeyEntity | ||
Результат | Scalr\Model\Entity\Account\User\ApiKeyEntity |
protected static string $apiVersion | ||
Результат | string |
protected static Environment,Scalr\Model\Entity\Account $env | ||
Результат |
protected Scalr_Governance $governance | ||
Результат | Scalr_Governance |
protected array $governanceConfiguration | ||
Результат | array |
protected static array $loggerConfiguration | ||
Результат | array |
protected static array $testData | ||
Результат | array |
protected static int $testEnvId | ||
Результат | integer |
protected static int $testUserId | ||
Результат | integer |