PHP 클래스 Scalr\Tests\WebTestCase

부터: 21.02.2013
저자: Vitaliy Demidov ([email protected])
상속: extends TestCase
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_testEnvId integer ID of the user's environment
$_testUserId integer ID of the user which is used in the functional test

보호된 메소드들

메소드 설명
assertResponseDataHasKeys ( array $keys, array $responseData, boolean $checkAll = false, string $dataColumnName = 'data' ) Asserts that response data array has necessary data keys.
getEnvironment ( ) : Scalr_Environment Gets a test environment instance
getRequest ( $requestType = Scalr_UI_Request::REQUEST_TYPE_UI, $requestClass = null, striing $uri, array $parameters = [], string $method = 'GET', array $server = [], array $files = [] ) : Scalr_UI_Request Prepares request
getUser ( ) : Scalr_Account_user Gets an test User instance
internalRequest ( string $uri, array $parameters = [] ) : mixed Get internal request to the controller's action ignoring checking aliases
isAdminUserTestClass ( ) : boolean Returns true if current test is for Scalr Admin privilege
markTestSkippedIfFunctionalTestsDisabled ( ) Marks test skipped if functional tests are disabled
markTestSkippedIfPlatformDisabled ( string $platform ) Skip test if platform does not enabled
request ( string $uri, array $parameters = [], string $method = 'GET', array $server = [], array $files = [] ) : array | string Makes a request to site
setUp ( )
tearDown ( )

메소드 상세

assertResponseDataHasKeys() 보호된 메소드

Asserts that response data array has necessary data keys.
protected assertResponseDataHasKeys ( array $keys, array $responseData, boolean $checkAll = false, string $dataColumnName = 'data' )
$keys array Array of the keys or Index array that looks like array($key => $constraint)
$responseData array Response array
$checkAll boolean optional Whether it should check all data array or only the first.
$dataColumnName string optional The name of the data column

getEnvironment() 보호된 메소드

Gets a test environment instance
protected getEnvironment ( ) : Scalr_Environment
리턴 Scalr_Environment Returns environment instance

getRequest() 보호된 메소드

Prepares request
protected getRequest ( $requestType = Scalr_UI_Request::REQUEST_TYPE_UI, $requestClass = null, striing $uri, array $parameters = [], string $method = 'GET', array $server = [], array $files = [] ) : Scalr_UI_Request
$uri striing A request uri
$parameters array optional Request parameters
$method string optional HTTP Request method
$server array optional Additional server options
$files array optional Uploaded files array
리턴 Scalr_UI_Request Returns array which represents returned json object or raw body content in the case if the response is not a json.

getUser() 보호된 메소드

Gets an test User instance
protected getUser ( ) : Scalr_Account_user
리턴 Scalr_Account_user Returns user instance

internalRequest() 보호된 메소드

Get internal request to the controller's action ignoring checking aliases
protected internalRequest ( string $uri, array $parameters = [] ) : mixed
$uri string
$parameters array
리턴 mixed Returns raw response as it is returned by action

isAdminUserTestClass() 보호된 메소드

Returns true if current test is for Scalr Admin privilege
protected isAdminUserTestClass ( ) : boolean
리턴 boolean

markTestSkippedIfFunctionalTestsDisabled() 보호된 메소드

Marks test skipped if functional tests are disabled

markTestSkippedIfPlatformDisabled() 보호된 메소드

Skip test if platform does not enabled
protected markTestSkippedIfPlatformDisabled ( string $platform )
$platform string

request() 보호된 메소드

Makes a request to site
protected request ( string $uri, array $parameters = [], string $method = 'GET', array $server = [], array $files = [] ) : array | string
$uri string A request uri
$parameters array optional Request parameters
$method string optional HTTP Request method
$server array optional Additional server options
$files array optional Uploaded files array
리턴 array | string Returns array which represents returned json object or raw body content in the case if the responce is not a json.

setUp() 보호된 메소드

또한 보기: PHPUnit_Framework_TestCase::setUp()
protected setUp ( )

tearDown() 보호된 메소드

또한 보기: PHPUnit_Framework_TestCase::tearDown()
protected tearDown ( )

프로퍼티 상세

$_testEnvId 보호되어 있는 프로퍼티

ID of the user's environment
protected int $_testEnvId
리턴 integer

$_testUserId 보호되어 있는 프로퍼티

ID of the user which is used in the functional test
protected int $_testUserId
리턴 integer