Download the PHP package bluepsyduck/test-helper without Composer
On this page you can find all versions of the php package bluepsyduck/test-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download bluepsyduck/test-helper
More information about bluepsyduck/test-helper
Files in bluepsyduck/test-helper
Download bluepsyduck/test-helper
More information about bluepsyduck/test-helper
Files in bluepsyduck/test-helper
Vendor bluepsyduck
Package test-helper
Short Description Some traits helping with testing using PHPUnit.
License GPL-3.0-or-later
Homepage https://github.com/BluePsyduck/test-helper
Package test-helper
Short Description Some traits helping with testing using PHPUnit.
License GPL-3.0-or-later
Homepage https://github.com/BluePsyduck/test-helper
Please rate this library. Is it a good library?
Informations about the package test-helper
BluePsyduck's Test Helper
This library contains a trait helping with testing classes using PHPUnit by providing some shortcut methods for the test cases.
ReflectionTrait
The ReflectionTrait
is a trait which adds methods for easier access to non-public properties and methods, making
mocking them easier. The trait comes with the following methods:
injectProperty($object, $name, $value)
: Injects the value to a property of the object.injectStaticProperty($className, $name, $value)
: Injects the value to a static property of the class.extractProperty($object, $name)
: Extracts the value of a property from the object.extractStaticProperty($className, $name)
: Extracts the value of a static property from the class.invokeMethod($object, $name, ...$params)
: Invokes a non-public method on the object.invokeStaticMethod($className, $name, ...$params)
: Invokes a non-public static method on the class.
Note: The parameters passed to invokeMethod()
and invokeStaticMethod()
are passed-by-value. If the method uses
references, the changes made by the method will not be visible to the outside.
All versions of test-helper with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4 | ^8.0
The package bluepsyduck/test-helper contains the following files
Loading the files please wait ....