function NoInstantiationMockStaticCallable::__construct

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php \Drupal\Tests\Core\Utility\NoInstantiationMockStaticCallable::__construct()

File

core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php, line 234

Class

NoInstantiationMockStaticCallable

Namespace

Drupal\Tests\Core\Utility

Code

public function __construct() {
    throw new \Exception(sprintf('The class %s should not require instantiation for the static method to be called.', __CLASS__));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.