Releases: Spameri/DependencyMocker
Releases · Spameri/DependencyMocker
PHP 8.1 support
Return NULL as expected
Fixed - When annotaion is empty return NULL instead of empty string.
Drop Nette/DI dependency
Dropped Nette/DI dependency for better usage in applications with different version of Nette/DI.
Mockery version Bump
- Fix when banned classes not set
- Travis config
v1.1
- New function allowing to call private method on object.
Example:
class TestClass
{
private function saltPassword($string)
{
return $string . 'salt';
}
}
Test result:
$testClass = new TestClass();
$result = \Spamer\DependencyMocker\Mocker::callPrivateFunction($testClass, 'saltPassword', ['string']);
\Tester\Assert::same('stringsalt', $result);