PHP 클래스 CIPHPUnitTestRequest, ci-phpunit-test

파일 보기 프로젝트 열기: kenjis/ci-phpunit-test 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$callablePreConstructors callable called pre controller constructor
$callables callable called post controller constructor
$enableHooks
$hooks CI_Hooks
$router CIPHPUnitTestRouter
$superGlobal CIPHPUnitTestSuperGlobal
$testCase

공개 메소드들

메소드 설명
__construct ( PHPUnit_Framework_TestCase $testCase )
addCallable ( callable $callable ) Add callable
addCallablePreConstructor ( callable $callable ) Add callable pre constructor
enableHooks ( ) Enable Hooks for Controllres This enables only pre_controller, post_controller_constructor, post_controller
getStatus ( ) : array Get HTTP Status Code Info
request ( string $http_method, array | string $argv, array | string $params = [] ) Request to Controller
setCallable ( callable $callable ) Set (and Reset) callable
setCallablePreConstructor ( callable $callable ) Set (and Reset) callable pre constructor
setHeader ( string $name, string $value ) Set HTTP request header

보호된 메소드들

메소드 설명
callControllerMethod ( string $http_method, array $argv, array | string $request_params ) Call Controller Method
callHook ( $hook )
createAndCallController ( $class, $method, $params, $call_display = true )
processError ( Exception $e )
requestUri ( string $http_method, string $uri, array | string $request_params ) Request to URI
setRawInputStream ( $string )

메소드 상세

__construct() 공개 메소드

public __construct ( PHPUnit_Framework_TestCase $testCase )
$testCase PHPUnit_Framework_TestCase

addCallable() 공개 메소드

Add callable
public addCallable ( callable $callable )
$callable callable function to run after controller instantiation

addCallablePreConstructor() 공개 메소드

Add callable pre constructor
public addCallablePreConstructor ( callable $callable )
$callable callable function to run before controller instantiation

callControllerMethod() 보호된 메소드

Call Controller Method
protected callControllerMethod ( string $http_method, array $argv, array | string $request_params )
$http_method string HTTP method
$argv array controller, method [, arg1, ...]
$request_params array | string POST params/GET params|raw_input_stream

callHook() 보호된 메소드

protected callHook ( $hook )

createAndCallController() 보호된 메소드

protected createAndCallController ( $class, $method, $params, $call_display = true )

enableHooks() 공개 메소드

Enable Hooks for Controllres This enables only pre_controller, post_controller_constructor, post_controller
public enableHooks ( )

getStatus() 공개 메소드

Get HTTP Status Code Info
public getStatus ( ) : array
리턴 array ['code' => code, 'text' => text]

processError() 보호된 메소드

protected processError ( Exception $e )
$e Exception

request() 공개 메소드

Request to Controller
public request ( string $http_method, array | string $argv, array | string $params = [] )
$http_method string HTTP method
$argv array | string array of controller,method,arg|uri
$params array | string POST params/GET params|raw_input_stream

requestUri() 보호된 메소드

Request to URI
protected requestUri ( string $http_method, string $uri, array | string $request_params )
$http_method string HTTP method
$uri string URI string
$request_params array | string POST params/GET params|raw_input_stream

setCallable() 공개 메소드

Set (and Reset) callable
public setCallable ( callable $callable )
$callable callable function to run after controller instantiation

setCallablePreConstructor() 공개 메소드

Set (and Reset) callable pre constructor
public setCallablePreConstructor ( callable $callable )
$callable callable function to run before controller instantiation

setHeader() 공개 메소드

Set HTTP request header
public setHeader ( string $name, string $value )
$name string header name
$value string value

setRawInputStream() 보호된 메소드

protected setRawInputStream ( $string )

프로퍼티 상세

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

callable called pre controller constructor
protected $callablePreConstructors

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

callable called post controller constructor
protected $callables

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

protected $enableHooks

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

protected CI_Hooks $hooks
리턴 CI_Hooks

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

protected CIPHPUnitTestRouter $router
리턴 CIPHPUnitTestRouter

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

protected CIPHPUnitTestSuperGlobal $superGlobal
리턴 CIPHPUnitTestSuperGlobal

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

protected $testCase