You are here

function MockDrupalSystem::moduleInvoke in X Autoload 7.5

Parameters

string $module:

string $hook:

Return value

mixed

Throws

\Exception

See also

module_invoke()

File

tests/src/Mock/MockDrupalSystem.php, line 96

Class

MockDrupalSystem

Namespace

Drupal\xautoload\Tests\Mock

Code

function moduleInvoke($module, $hook) {
  $args = func_get_args();
  switch (count($args)) {
    case 2:
      return PureFunctions::moduleInvoke($module, $hook);
    case 3:
      return PureFunctions::moduleInvoke($module, $hook, $args[2]);
    case 4:
      return PureFunctions::moduleInvoke($module, $hook, $args[2], $args[3]);
    default:
      throw new \Exception("More arguments than expected.");
  }
}