Test helpers: Difference between revisions

From Sunhill Framework Documentation
Page created
 
No edit summary
Line 1: Line 1:
{{Incomplete}}
== getField() ==
== getField() ==



Revision as of 10:42, 2 September 2024


This page is incomplete

getField()

invokeMethod(object &$object, string $methodName, array $parameters = array())

This function calls the protected method $methodName of the object $object with the parameters $parameters.

Example:

callProtectedMethod(object &$object, string $methodName, array $parameters = array())

An alias to invokeMethod().

setProtectedProperty(object &$object,string $property_name,mixed $value)

This function sets the value of the protected property $property_name of the object $object to the value $value.

getProtectedProptery(object &$object,string $property_name): mixed

This method returns the protected property $property_name of the object $object.

checkArrays(array $expect, array $test): bool

This function test if every element of $expect is a memeber of the array $test. If the element of $expect is in turn an array the function is called recursivly.

assertArrayContains(array $expect, array $test)

This function raises a test failure if checkArrays() with the given parameters is false otherwise a test success.