PHP Class KamranAhmed\Smasher\ScannerTest

Tests the Scanner class
Inheritance: extends PHPUnit_Framework_TestCase
Datei anzeigen Open project: kamranahmedse/smasher

Public Methods

Method Description
callProtectedMethod ( $object, $method, array $args = [] )
setUp ( ) Setup the class for testing
testCanGetScannedContentFromJsonFile ( )
testCanPopulatePathUsingInputFile ( )
testCanProbePathAndGenerateArrayOfContent ( )
testCanScanPathAndCreateValidResponseFile ( )
testCanScanPathAndGetResult ( )
testGettingContentThrowsExceptionForEmptyFile ( )
testGettingContentThrowsExceptionForInvalidFile ( )
testThrowsExceptionTryingToScanInvalidPath ( )

Protected Methods

Method Description
tearDown ( ) Remove unnecessary files/directories

Private Methods

Method Description
isValidJson ( $json )
removeDirectory ( $directory )

Method Details

callProtectedMethod() public static method

public static callProtectedMethod ( $object, $method, array $args = [] )
$args array

setUp() public method

Setup the class for testing
public setUp ( )

tearDown() protected method

Remove unnecessary files/directories
protected tearDown ( )

testCanGetScannedContentFromJsonFile() public method

testCanPopulatePathUsingInputFile() public method

testCanProbePathAndGenerateArrayOfContent() public method

testCanScanPathAndCreateValidResponseFile() public method

testCanScanPathAndGetResult() public method

testGettingContentThrowsExceptionForEmptyFile() public method

testGettingContentThrowsExceptionForInvalidFile() public method

testThrowsExceptionTryingToScanInvalidPath() public method