Skip to content

@VBoss VBoss released this Feb 8, 2016 · 4 commits to master since this release

  • 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);
Assets 2
You can’t perform that action at this time.