PHP Class DefaultConfigTest, PHPSandbox

Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: Corveda/PHPSandbox

Protected Properties

Property Type Description
$sandbox PhpSandbox\PHPSandbox

Public Methods

Method Description
expectException ( $exception )
setUp ( ) Sets up the test
test ( )
test2 ( )
testAllowsReferences ( ) Test whether sandbox allows references
testAllowsStaticVariableCreation ( ) Test whether sandbox allows static variable creation
testAllowsVariableCreation ( ) Test whether sandbox allows variable creation
testAutowhitelistTrustedCode ( ) Test whether sandbox autowhitelists trusted code
testCallbackViolations ( ) Test whether sandbox disallows violating callbacks
testCallbackViolationsWithStringManipulation ( ) Test whether sandbox disallows violating callbacks even with manipulated sandboxed strings
testConvertErrors ( ) Test whether sandbox converts errors to exceptions
testCustomErrorHandler ( ) Test whether sandbox custom error handler intercepts errors
testCustomExceptionHandler ( ) Test whether sandbox custom exception handler intercepts exceptions
testCustomFunctionValidationFailure ( ) Test whether sandbox custom function validation succeeds
testCustomFunctionValidationSuccess ( ) Test whether sandbox custom function validation succeeds
testCustomValidationErrorHandler ( ) Test whether sandbox custom validation error handler intercepts validation Errors
testDisallowsAliases ( ) Test whether sandbox disallows aliases (aka uses)
testDisallowsBackticks ( ) Test whether sandbox disallows backtick execution
testDisallowsCasting ( ) Test whether sandbox disallows casting
testDisallowsClasses ( ) Test whether sandbox disallows classes
testDisallowsClosures ( ) Test whether sandbox disallows closures
testDisallowsConstants ( ) Test whether sandbox disallows classes
testDisallowsDie ( ) Test whether sandbox disallows die keyword
testDisallowsErrorSuppressing ( ) Test whether sandbox disallows error suppressing
testDisallowsEscaping ( ) Test whether sandbox disallows escaping to HTML
testDisallowsEval ( ) Test whether sandbox disallows eval keyword
testDisallowsExit ( ) Test whether sandbox disallows exit keyword
testDisallowsFunctions ( ) Test whether sandbox disallows functions
testDisallowsGlobals ( ) Test whether sandbox disallows globals
testDisallowsHalting ( ) Test whether sandbox disallows halting
testDisallowsInclude ( ) Test whether sandbox disallows include keyword
testDisallowsIncludeOnce ( ) Test whether sandbox disallows include_once keyword
testDisallowsInterfaces ( ) Test whether sandbox disallows interfaces
testDisallowsNamespaces ( ) Test whether sandbox disallows namespaces
testDisallowsNonwhitelistedClass ( ) Test whether sandbox disallows non-whitelisted class
testDisallowsNonwhitelistedFunction ( ) Test whether sandbox disallows non-whitelisted functions
testDisallowsNonwhitelistedType ( ) Test whether sandbox disallows non-whitelisted class type
testDisallowsRequire ( ) Test whether sandbox disallows require keyword
testDisallowsRequireOnce ( ) Test whether sandbox disallows require_once keyword
testDisallowsTraits ( ) Test whether sandbox disallows traits
testHelloWorldEchoed ( ) Test whether sandbox echoes expected value
testHelloWorldReturned ( ) Test whether sandbox returns expected value
testMagicConstants ( ) Test whether sandbox disallows violating callbacks
testSandboxedStringsMimicStrings ( ) Test whether sandboxed strings do not cause conflicts with is_string, is_object, or is_scalar
testSandboxedStringsSatisfyIntval ( ) Test whether sandboxed strings do not cause conflicts with intval
testSettingAndUnsettingOptions ( )
testSettingAndUnsettingOptionsViaCompatibilityAPI ( )
testStaticTypeOverwriting ( )
testWhitelistMagicConstants ( ) Test whether sandbox disallows violating callbacks

Method Details

expectException() public method

public expectException ( $exception )

setUp() public method

Sets up the test
public setUp ( )

test() public method

public test ( )

test2() public method

public test2 ( )

testAllowsReferences() public method

Test whether sandbox allows references

testAllowsStaticVariableCreation() public method

Test whether sandbox allows static variable creation

testAllowsVariableCreation() public method

Test whether sandbox allows variable creation

testAutowhitelistTrustedCode() public method

Test whether sandbox autowhitelists trusted code

testCallbackViolations() public method

Test whether sandbox disallows violating callbacks

testCallbackViolationsWithStringManipulation() public method

Test whether sandbox disallows violating callbacks even with manipulated sandboxed strings

testConvertErrors() public method

Test whether sandbox converts errors to exceptions
public testConvertErrors ( )

testCustomErrorHandler() public method

Test whether sandbox custom error handler intercepts errors

testCustomExceptionHandler() public method

Test whether sandbox custom exception handler intercepts exceptions

testCustomFunctionValidationFailure() public method

Test whether sandbox custom function validation succeeds

testCustomFunctionValidationSuccess() public method

Test whether sandbox custom function validation succeeds

testCustomValidationErrorHandler() public method

Test whether sandbox custom validation error handler intercepts validation Errors

testDisallowsAliases() public method

Test whether sandbox disallows aliases (aka uses)

testDisallowsBackticks() public method

Test whether sandbox disallows backtick execution

testDisallowsCasting() public method

Test whether sandbox disallows casting

testDisallowsClasses() public method

Test whether sandbox disallows classes

testDisallowsClosures() public method

Test whether sandbox disallows closures

testDisallowsConstants() public method

Test whether sandbox disallows classes

testDisallowsDie() public method

Test whether sandbox disallows die keyword
public testDisallowsDie ( )

testDisallowsErrorSuppressing() public method

Test whether sandbox disallows error suppressing

testDisallowsEscaping() public method

Test whether sandbox disallows escaping to HTML

testDisallowsEval() public method

Test whether sandbox disallows eval keyword
public testDisallowsEval ( )

testDisallowsExit() public method

Test whether sandbox disallows exit keyword
public testDisallowsExit ( )

testDisallowsFunctions() public method

Test whether sandbox disallows functions

testDisallowsGlobals() public method

Test whether sandbox disallows globals

testDisallowsHalting() public method

Test whether sandbox disallows halting

testDisallowsInclude() public method

Test whether sandbox disallows include keyword

testDisallowsIncludeOnce() public method

Test whether sandbox disallows include_once keyword

testDisallowsInterfaces() public method

Test whether sandbox disallows interfaces

testDisallowsNamespaces() public method

Test whether sandbox disallows namespaces

testDisallowsNonwhitelistedClass() public method

Test whether sandbox disallows non-whitelisted class

testDisallowsNonwhitelistedFunction() public method

Test whether sandbox disallows non-whitelisted functions

testDisallowsNonwhitelistedType() public method

Test whether sandbox disallows non-whitelisted class type

testDisallowsRequire() public method

Test whether sandbox disallows require keyword

testDisallowsRequireOnce() public method

Test whether sandbox disallows require_once keyword

testDisallowsTraits() public method

Test whether sandbox disallows traits
public testDisallowsTraits ( )

testHelloWorldEchoed() public method

Test whether sandbox echoes expected value

testHelloWorldReturned() public method

Test whether sandbox returns expected value

testMagicConstants() public method

Test whether sandbox disallows violating callbacks
public testMagicConstants ( )

testSandboxedStringsMimicStrings() public method

Test whether sandboxed strings do not cause conflicts with is_string, is_object, or is_scalar

testSandboxedStringsSatisfyIntval() public method

Test whether sandboxed strings do not cause conflicts with intval

testSettingAndUnsettingOptions() public method

testSettingAndUnsettingOptionsViaCompatibilityAPI() public method

testStaticTypeOverwriting() public method

testWhitelistMagicConstants() public method

Test whether sandbox disallows violating callbacks

Property Details

$sandbox protected property

protected PHPSandbox,PHPSandbox $sandbox
return PhpSandbox\PHPSandbox