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

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

Protected Properties

Property Type Description
$jsonLoader PHPUnit_Framework_MockObject_MockBuilder JSON loader mock builder

Public Methods

Method Description
notStringDataProvider ( ) : array Data provider for testSupportsWithInvalidResource
setUp ( )
tearDown ( )
testLoad ( ) Test loading a JSON string
testSupportsWithInvalidResource ( mixed $invalidResource ) Test loading resources supported by the JsonLoader
testSupportsWithJsonFile ( ) Test loading a JSON file Note that this function tests isJson with a valid Json string
testSupportsWithJsonString ( ) Test loading a JSON string
testSupportsWithNonJsonString ( ) Test isJson method with invalid JSON string.

Method Details

notStringDataProvider() public method

Data provider for testSupportsWithInvalidResource
public notStringDataProvider ( ) : array
return array array non-string values

setUp() public method

public setUp ( )

tearDown() public method

public tearDown ( )

testLoad() public method

Test loading a JSON string
public testLoad ( )

testSupportsWithInvalidResource() public method

Test loading resources supported by the JsonLoader
public testSupportsWithInvalidResource ( mixed $invalidResource )
$invalidResource mixed Invalid resource value

testSupportsWithJsonFile() public method

Test loading a JSON file Note that this function tests isJson with a valid Json string

testSupportsWithJsonString() public method

Test loading a JSON string

testSupportsWithNonJsonString() public method

Valid scenario is tested by the method above

Property Details

$jsonLoader protected_oe property

JSON loader mock builder
protected PHPUnit_Framework_MockObject_MockBuilder $jsonLoader
return PHPUnit_Framework_MockObject_MockBuilder