Test helpers: Difference between revisions
From Sunhill Framework Documentation
No edit summary |
- assert method |
||
Line 17: | Line 17: | ||
== checkArrays(array $expect, array $test): bool == | == 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. | 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. | ||
Revision as of 10:43, 5 October 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.