Kraken\_Module\Util\Factory\FactoryTest::createFactoryPlugin PHP Method

createFactoryPlugin() public method

public createFactoryPlugin ( callable $register = null, callable $unregister = null ) : Kraken\Util\Factory\FactoryPluginInterface | PHPUnit_Framework_MockObject_MockObject
$register callable
$unregister callable
return Kraken\Util\Factory\FactoryPluginInterface | PHPUnit_Framework_MockObject_MockObject
    public function createFactoryPlugin(callable $register = null, callable $unregister = null)
    {
        $register = $register === null ? function () {
        } : $register;
        $unregister = $unregister === null ? function () {
        } : $unregister;
        $mock = $this->getMock(FactoryPluginMock::class, ['register', 'unregister']);
        $mock->expects($this->any())->method('register')->will($this->returnCallback($register));
        $mock->expects($this->any())->method('unregister')->will($this->returnCallback($unregister));
        return $mock;
    }