PHP Класс Cascade\Tests\Config\Loader\ClassLoader\Resolver\ConstructorResolverTest

Автор: Raphael Antonmattei ([email protected])
Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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