PHP Class Cascade\Tests\Config\Loader\FileLoader\FileLoaderAbstractTest

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

Protected Properties

Property Type Description
$mock PHPUnit_Framework_MockObject_MockObject Mock of extending Cascade\Config\Loader\FileLoader\FileLoaderAbstract

Public Methods

Method Description
arrayDataProvider ( ) : array Data provider for testGetSectionOf
extensionsDataProvider ( ) : array Data provider for testGetSectionOf
setUp ( )
tearDown ( )
testGetSectionOf ( array $array, string $section, array $expected ) Test the getSectionOf function
testLoadFileFromString ( ) Test loading config from a valid file
testReadFrom ( ) Test loading config from a valid file
testValidateExtension ( boolean $expected, $filepath ) Test validating the extension
testloadFileFromInvalidFile ( ) Test loading an invalid file

Method Details

arrayDataProvider() public method

Data provider for testGetSectionOf
public arrayDataProvider ( ) : array
return array array wit original value, section and expected value

extensionsDataProvider() public method

Data provider for testGetSectionOf
public extensionsDataProvider ( ) : array
return array array with original value, section and expected value

setUp() public method

public setUp ( )

tearDown() public method

public tearDown ( )

testGetSectionOf() public method

Test the getSectionOf function
public testGetSectionOf ( array $array, string $section, array $expected )
$array array Array of options
$section string Section key
$expected array Expected array for the given section

testLoadFileFromString() public method

Test loading config from a valid file

testReadFrom() public method

Test loading config from a valid file
public testReadFrom ( )

testValidateExtension() public method

Test validating the extension
public testValidateExtension ( boolean $expected, $filepath )
$expected boolean Expected boolean value

testloadFileFromInvalidFile() public method

Test loading an invalid file

Property Details

$mock protected_oe property

Mock of extending Cascade\Config\Loader\FileLoader\FileLoaderAbstract
protected PHPUnit_Framework_MockObject_MockObject $mock
return PHPUnit_Framework_MockObject_MockObject