PHP Class Cascade\Tests\Config\Loader\ClassLoader\Resolver\ExtraOptionsResolverTest

Author: Raphael Antonmattei ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Datei anzeigen Open project: theorchard/monolog-cascade

Protected Properties

Property Type Description
$reflected ReflectionClass Reflection class for which you want to resolve extra options
$resolver Cascade\Config\Loader\ClassLoader\Resolver\ExtraOptionsResolver ExtraOptions Resolver

Public Methods

Method Description
invalidOptionsProvider ( ) : array Data provider for testResolveWithInvalidOptions
optionsProvider ( ) : array Data provider for testResolveWithInvalidOptions
setUp ( ) Set up function
tearDown ( ) Tear down function
testConstructor ( ) Test the resolver contructor
testGenerateParamsHashKey ( ) Test the hsah key generation
testResolve ( ) Test resolving with valid options
testResolveWithCustomOptionHandler ( ) Test resolving with valid options
testResolveWithInvalidOptions ( array $invalidOptions ) Test resolving with invalid options. It should throw an exception.

Method Details

invalidOptionsProvider() public method

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 closure param position
public invalidOptionsProvider ( ) : array
return array of arrays with expected resolved values and options used as input

optionsProvider() public method

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 closure param position
public optionsProvider ( ) : array
return array of arrays with expected resolved values and options used as input

setUp() public method

Set up function
public setUp ( )

tearDown() public method

Tear down function
public tearDown ( )

testConstructor() public method

Test the resolver contructor
public testConstructor ( )

testGenerateParamsHashKey() public method

Test the hsah key generation

testResolve() public method

Test resolving with valid options
public testResolve ( )

testResolveWithCustomOptionHandler() public method

Test resolving with valid options

testResolveWithInvalidOptions() public method

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

Property Details

$reflected protected_oe property

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

$resolver protected_oe property

ExtraOptions Resolver
protected ExtraOptionsResolver,Cascade\Config\Loader\ClassLoader\Resolver $resolver
return Cascade\Config\Loader\ClassLoader\Resolver\ExtraOptionsResolver