PHP 클래스 Cascade\Tests\Config\Loader\ClassLoader\Resolver\ConstructorResolverTest

저자: Raphael Antonmattei ([email protected])
상속: extends PHPUnit_Framework_TestCase
파일 보기 프로젝트 열기: theorchard/monolog-cascade

보호된 프로퍼티들

프로퍼티 타입 설명
$reflected ReflectionClass Reflection class for which you want to resolve extra options
$resolver Cascade\Config\Loader\ClassLoader\Resolver\ConstructorResolver Constructor Resolver

공개 메소드들

메소드 설명
invalidOptionsProvider ( ) : array Data provider for testResolveWithInvalidOptions
missingOptionsProvider ( ) : array Data provider for testResolveWithInvalidOptions.
optionsProvider ( ) : array Data provider for testResolve
setUp ( ) Set up function
tearDown ( ) Tear down function
testConstructor ( ) Test the resolver contructor
testHashToArgsArray ( ) Test the hashToArgsArray function
testInitConstructorArgs ( ) Test that constructor args were pulled properly
testResolve ( array $expectedResolvedOptions, array $options ) Test resolving with valid options
testResolveWithInvalidOptions ( array $invalidOptions ) Test resolving with invalid options. It should throw an exception.
testResolveWithMissingOptions ( array $incompleteOptions ) Test resolving with missing/incomplete options. It should throw an exception.

보호된 메소드들

메소드 설명
getConstructorArgs ( ) : ReflectionParameter[] Return the contructor args of the reflected class

메소드 상세

getConstructorArgs() 보호된 메소드

Return the contructor args of the reflected class
protected getConstructorArgs ( ) : ReflectionParameter[]
리턴 ReflectionParameter[] array of params

invalidOptionsProvider() 공개 메소드

The order of the input options does not matter and is somewhat random. The resolution should reconcile those options and match them up with the contructor param position
public invalidOptionsProvider ( ) : array
리턴 array of arrays with expected resolved values and options used as input

missingOptionsProvider() 공개 메소드

The order of the input options does not matter and is somewhat random. The resolution should reconcile those options and match them up with the contructor param position
public missingOptionsProvider ( ) : array
리턴 array of arrays with expected resolved values and options used as input

optionsProvider() 공개 메소드

The order of the input options does not matter and is somewhat random. The resolution should reconcile those options and match them up with the contructor param position
public optionsProvider ( ) : array
리턴 array of arrays with expected resolved values and options used as input

setUp() 공개 메소드

Set up function
public setUp ( )

tearDown() 공개 메소드

Tear down function
public tearDown ( )

testConstructor() 공개 메소드

Test the resolver contructor
public testConstructor ( )

testHashToArgsArray() 공개 메소드

Test the hashToArgsArray function
public testHashToArgsArray ( )

testInitConstructorArgs() 공개 메소드

Note that we need to deuplicate the CamelCase conversion here for old fashioned classes

testResolve() 공개 메소드

Test resolving with valid options
public testResolve ( array $expectedResolvedOptions, array $options )
$expectedResolvedOptions array Array of expected resolved options (i.e. parsed and validated)
$options array Array of raw options

testResolveWithInvalidOptions() 공개 메소드

Test resolving with invalid options. It should throw an exception.
public testResolveWithInvalidOptions ( array $invalidOptions )
$invalidOptions array Array of invalid options

testResolveWithMissingOptions() 공개 메소드

Test resolving with missing/incomplete options. It should throw an exception.
public testResolveWithMissingOptions ( array $incompleteOptions )
$incompleteOptions array Array of invalid options

프로퍼티 상세

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

Reflection class for which you want to resolve extra options
protected ReflectionClass $reflected
리턴 ReflectionClass

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

Constructor Resolver
protected ConstructorResolver,Cascade\Config\Loader\ClassLoader\Resolver $resolver
리턴 Cascade\Config\Loader\ClassLoader\Resolver\ConstructorResolver